When a person’s happiness swings widely in reaction to the good and bad things that happen during the day, sleep can suffer. Researchers analyzed data from 100 middle-aged participants in a longitudinal study of midlife in the United States that included telephone interviews about participants’ daily experience as well as subjective and objective measures of sleeping habits.