People who have sleep interruptions in their 30s and 40s are more than twice as likely to experience thinking and memory issues a decade later, a new study out Jan. 3 in Neurology finds.

Researchers said the quality and not quantity of sleep matters most for cognitive health in middle age. The team followed 526 people for 11 years. The average age of people involved was 40. The team measured their sleep duration and quality with a wrist monitor for three days sight for two occasions about one year apart, so the data was based on averages of that data. 

The people reported bedtimes and wake times and took part in sleep quality surveys where they ranked the quality of their sleep (higher scores on a 1-to-30 scale indicated poorer quality of sleep), and they had to note sleep interruptions as well. The people participated in memory and thinking tests. On average, people slept six hours per night. Of the people involved in the study, 46% reported poor sleep and had scores above five.

The team split up participants in three groups based on sleep fragmentation, or interruptions. Of the 175 people who had the most disrupted sleep, 44 of them had poor cognitive performance 10 years later, compared to 10 of the 176 people with the least disrupted sleep.

There was no difference in cognitive performance at midlife for those with middling disrupted sleep compared to the group with the least disrupted sleep.

The team of investigators called for more research to evaluate the link between cognition and sleep interruptions at different stages of life so people know if there’s a critical point when sleep is more strongly tied to cognitive performance.

Adults are generally supposed to receive seven to 10 hours of sleep every night, but only 2 out of 3 people get enough, the US Centers for Disease Control and Prevention reports. Anywhere from 50 million to 70 million Americans struggle with sleep disorders like insomnia and sleep apnea.