People in their 30s and 40s who have disrupted sleep may be more likely to have memory and thinking problems later in life, according to a new study.

The researchers found that repetitive short interruptions of sleep in midlife were linked to worse cognitive function 11 years later.

They found no association, however, between worse cognitive function and sleep duration or self-reported quality of sleep.

“Our findings suggest that the association between sleep quality and cognition may become prominent as early as in midlife,” the researchers wrote.

The study was published on Wednesday in Neurology, the medical journal of the American Academy of Neurology. It included more than 500 participants who were followed for more than a decade.