One of the joys of adulthood is that you can go to bed and wake up whenever you want to. But, like most seemingly good things, that indulgence can really screw you over. Late night Netflix and early morning work interferes with the healthy, lovely things that regular sleep can do. According to a study released Friday in Scientific Reports, you need to go back to having a proper bedtime.

That’s because irregular sleep can do far more than make you cranky. In this study, researchers from Duke University Medical Center analyzed the sleeping patterns, physical health, and mental health of 1,978 adults and found an association between sleep regularity and better heart and metabolic health. While this study can’t conclude definitively that bad sleep is causing bad health, there’s certainly a link. Overall, people with irregular sleep patterns were more likely to weigh more, have a heart attack or stroke, and have higher blood sugar and blood pressure than people who sleep and wake up at a consistent time.

Study co-author, clinical psychologist, and professor Jessica Lunsford-Avery, Ph.D., tells Inverse that while researchers can’t conclude that irregular sleep and wake patterns result in a risk for heart disease and diabetes, there are likely some processes by which these patterns contribute to those health risks.

“In our study, individuals with more irregular sleep and wake times tended to be less physically active, more stressed, and more depressed — all of which could contribute to poorer hearth and metabolic health,” Lunsford-Avery says. “In addition, prior studies have shown that poor sleep may interfere with metabolism, which may also contribute to obesity and risk for heart disease.”

laptops sleeping
Using a laptop and other digital devices before going to bed can be harmful to your sleep.

Lunsford-Avery and her colleagues examined the responses of 1,978 individuals, ages 45 to 84, who took part in a longitudinal observational study called the Multi-Ethnic Study of Atherosclerosis. This group did not include people were diagnosed with sleep disorders, like sleep apnea. Participants were given a wrist-worn device that measured physical activity and ambient light and instructed to wear the device for seven consecutive days while journaling about their sleep. They were told to press a button the device when they went to sleep and again when they woke up.

During the study period, the researchers also assessed the participant’s self-reported daytime sleepiness, surveyed their mental health, and assessed their likelihood of developing cardiovascular and metabolic diseases. They found that irregular sleepers were more likely to report depression and stress than regular sleepers. Importantly, they also determined that greater sleep irregularity was correlated with a 10-year risk of cardiovascular disease, hypertension, diabetes, and obesity.

Certain other patterns also emerged. African-Americans had the most irregular sleep patterns compared to participants who were Hispanic, Chinese-American, or white. People with hypertension were more like to sleep more, and people with obesity were more likely to stay up later. Recognizing these patterns is important to scientists, who hope they can gain an understanding of who is likely to develop these conditions by examining who is sleeping worse.

Adults are recommended seven to nine hours of sleep every night, but this study says that it’s not enough to just get that shut-eye — you need to maintain a dedicated sleeping schedule.

“A fairly straightforward recommendation would be to set your alarm clock to rise at the same times, even on weekends,” says Lunsford-Avery. “Setting a regular bedtime, and sticking to it to the best of your ability, is likely to be beneficial for your health.”