A new fly study provides evidence to the notion that getting a full night’s rest — and even getting extra sleep every so often — can improve your memory and possibly even prevent Alzheimer’s disease.

The research team, led by Paul Shaw at the University School of Medicine in Washington, examined three different groups of fruit flies that had been modified with memory problems and an inability to generate new memories. One group had memory issues similar to Alzheimer’s disease, the second group was unable to establish connections, and the third had too many memory connections.

“Given the role that sleep plays in modulating plasticity, we hypothesized that increasing sleep would restore memory to canonical memory mutants without specifically rescuing the causal molecular lesion,” the authors wrote in the study.

The researchers then induced sleep on the flies in three different ways, and they found that extra sleep allowed the flies to create new memories. Even just 3-4 hours of sleep boosted the cognitive function of the flies.

“In all of these flies, the lost or disabled gene still does not work properly,” Stephanie Dissel, senior scientist at Shaw’s laboratory and an author of the study, said. “Sleep can’t bring that missing gene back, but it finds ways to work around the physiological problem.”

While the study was done on fruit flies and not humans, the results make sense — as previous research on the importance of sleep has shown that not getting enough sleep could lead to a slew of chronic disorders, including impaired memory and cognitive function. One recent study found that people with sleeping problems had a higher risk of developing amyloid deposits in their brains, which is associated with Alzheimer’s disease. Another study found that when you sleep more now, and invest in resting your mind and body, the benefits will appear later on — paving the way for better memory consolidation and improved physical health in your older age.

It’s possible that sleeping the proper amount can help prevent Alzheimer’s disease from developing — or at least slow it down. Waking up consistently during the night, or in general experiencing disturbed sleep patterns, could contribute to the development of the disease, according to a study from the Johns Hopkins Bloomberg School of Public Health. This is because sleep actually changes the brain — acting as a cleanser, of sorts — and lacking it can cause serious consequences over time.

“[I]nducing sleep also reverses memory defects in a Drosophila model of Alzheimer’s disease,” the authors of the latest study wrote. “Together, these data demonstrate that sleep plays a more fundamental role in modulating behavioral plasticity than previously appreciated and suggest that increasing sleep may benefit patients with certain neurological disorders.”

But testing it out in humans will still take some time. 

“Our data showed that extra sleep can handle any of these problems,” Shaw said. “It has to be the right kind of sleep, and we’re not sure how to induce this kind of slumber in the human brain yet, but our research suggests that if we can learn how, it could have significant therapeutic potential.”

Source: Dissel S, Angadi V, Kirszenblat L, Suzuki Y, Donlea J, Klose M. Sleep Restores Behavioral Plasticity to Drosophila Mutants. Current Biology, 2015.