Sleeping longer — eight hours or more a night — could shorten your life, according to a study of the nighttime habits of more than a million Americans released on Thursday.

Researchers from the University of California at San Diego found in a study of adults aged 30 to 102 that people who slept eight hours a night were 12 percent more likely to die within the study’s six-year period compared to those sleeping seven hours.