If you do shift work, you may want to track how much sleep you get.

According to a new study published in the Journal of Epidemiology & Community Health, sleeping and waking up at different times could increase the risk of a heart attack or stroke.

For seven days, scientists tracked the activity of 72,269 people aged 40 to 79 who had never been affected by a major cardiovascular event. The researchers calculated each participant’s Sleep Regularity Index (SRI) score. Higher scores equated to more regular sleepers.

Scientists then looked at incidents of cardiovascular death, heart failure, heart attack and stroke over an eight-year period. They found irregular sleepers were 26% more likely to suffer one of these events than those who had regular sleep patterns.

The study suggested that 26% of irregular sleepers could also be influenced by a number of factors including age, physical activity, smoking and drinking. Because it’s an observational study, scientists say they can’t know for sure if irregular sleep patterns are the cause of increased risk.

Those with higher SRI score were more likely to get the recommended average of seven to nine hours of sleep per night for those aged 18 to 64, and seven to eight hours for those aged 65 and over, and 61% of regular sleepers doing so compared to 48% of irregular sleepers.

Researchers say even if those irregular sleepers got the recommended amount of slumber, they still had a higher risk of suffering a cardiovascular event.