In case you need more convincing to prioritize shut-eye, new research suggests that getting good-quality Zs may protect your brain against dementia.

The study, published in the journal Neurology, found that adults who don’t sleep well may be at increased risk for Alzheimer’s disease. Researchers don’t know if poor sleep fuels disease progression or if early signs of the disease somehow lead to sleep disruption—or a combination of both. But either way, they say that chronic sleep problems may be a sign that someone is at higher-than-average risk for developing dementia later in life.

This isn’t the first study to find a link between sleep and Alzheimer’s disease. Other research has suggested that the brain uses periods of sleep to perform “maintenance” and clear out waste, the study authors wrote in their paper. And when sleep doesn’t happen the way it should, proteins like amyloid and tau are more likely to build up and form plaques and tangles—both of which are found in the brains of people with Alzheimer’s disease.

But the new research looked beyond amyloid and tau levels, for other biological markers of Alzheimer’s disease in seemingly healthy adults. Scientists from the University of Wisconsin–Madison recruited 101 people, average age 63, all of whom had normal thinking and memory skills but carried genetic risk factors for Alzheimer’s disease. The participants answered questions about their sleep quality, and also provided samples of spinal fluid.

From that spinal fluid, the researchers found that people who reported poor sleep quality had, on average, more markers of Alzheimer’s disease—including amyloid and tau buildups, brain-cell damage, and inflammation. Those associations remained even after the findings were adjusted for use of sleep medications, amount of education, depression symptoms, and body mass index.

There were exceptions, however. Surprisingly, the researchers did not find increased levels of Alzheimer’s markers when they looked specifically at people with obstructive sleep apnea, a breathing disorder that’s a major disruptor of sleep and a risk factor for several other chronic diseases.

They’re not sure what might explain the discrepancy, but they point out that they did not actually test participants for sleep apnea; they only asked people if they had it. “Sleep-disordered breathing often goes undetected by patients, and subjective reports are not reliable,” they wrote.

It’s possible that Alzheimer’s disease, in its very early stages, actually causes sleep problems—even before other symptoms are noticeable. There’s evidence that amyloid plaques disrupt slow-wave sleep, the authors wrote, which is “important for feeling refreshed.” This could explain why people with more Alzheimer’s markers were more likely to report poor sleep, they added.

But overall, the researchers say that poor sleep could be a potential contributor to Alzheimer’s disease progression—and one that people may be able to do something about before it’s too late. “Many effective pharmaceuticals, devices, and behavioral interventions are already available in the clinic for improving sleep quality,” they wrote, adding that follow-up studies are needed to determine exactly which aspects of sleep should be improved in order to delay or diminish Alzheimer’s symptoms.

Even though their findings suggest only a modest effect of sleep on Alzheimer’s risk, the researchers believe it could still be very important. Finding a way to delay the start of symptoms of Alzheimer’s disease even by just five years could reduce the number of cases in the United States by 5.7 million, they wrote, and save $367 billion in health-care spending.