Sleep is crucial to health; that much is clear. From helping rev your metabolism to improving memory, the benefits of getting a good night’s sleep — and the dangers of sleep deprivation — are no longer a matter of debate.

However, even as new benefits keep showing up, researchers have found it difficult to figure out exactly what it is that sleep does to produce such a huge range of health effects. Now they think they may have the answer.

Sleep, researchers suspect, helps brain cells clean up their trash, or, more scientifically, it is involved in the recently discovered process by which brain cells clear out the protein debris that has been linked to dementia and Alzheimer's disease. The finding revolutionizes how we think about the brain — and sleep.

Astrocytes pump cerebrospinal fluid rapidly through the brain’s tissues. This flushes out debris and other waste through the blood-brain-barrier and into the circulatory system, where it is eventually processed by the liver for removal.

Until recently, it was not clear how the brain removed its own waste. The major system responsible for clearing waste in the rest of the body — the lymphatic system — does not penetrate the brain.

Scientists had previously found that the total amount of energy consumed by the brain did not dramatically decrease during sleep, indicating that the brain was performing an important task. But no one knew what that task was.

Then last year, researchers at the University of Rochester Medical Center discovered a massive “plumbing network” in the brain responsible for cleaning out bits of debris from proteins. This network, called the glymphatic system, is comprised of connections made by astrocytes, a type of glial cell found exclusively in the brain.

In a landmark paper published in the journal Science, the group at Rochester put two-and-two together. They demonstrated that the glymphatic system is highly active during sleep, rapidly clearing out the brain’s own garbage.

Using state-of-the-art imaging techniques in the brains of living animals, the researchers observed that the astrocytes pump cerebrospinal fluid rapidly through the brain’s tissues. This flushes out debris and other waste through the blood-brain-barrier and into the circulatory system, where it is eventually processed by the liver for removal.

In addition, the scientists discovered that during sleep, most brain cells reduce in size by 60 percent. This constriction increases the space between cells, allowing more cerebrospinal fluid to wash through and enabling the astrocytes to remove even more waste.

By comparing the glymphatic system in awake mice vs. sleeping mice, the scientists discovered that the glymphatic system was 10-times more active during sleep than wakefulness. The system was also more efficient during sleep, removing more of a toxic product called amyloid-beta, the protein that accumulates in brains of Alzheimer’s disease patients.

“The brain only has limited energy at its disposal and it appears that it must choose between two different functional states – awake and aware or asleep and cleaning up,” said Maiken Nedergaard, co-director of the University of Rochester Medical Center Center for Translational Neuromedicine and lead author of the article.

“You can think of it like having a house party. You can either entertain the guests or clean up the house, but you can't really do both at the same time.”

Next up is to figure out how the glymphatic system is regulated. There is already speculation that noradrenaline, a hormone that is less active during sleep, may control the reduction in brain cell size that facilitates the flow of cerebrospinal fluid.

The researchers are also planning to test whether the glymphatic system is actually present in humans the same way it is in mice. While evidence of the system has yet to be directly imaged in human brains, scientists have postulated that it is most likely there because mice brains are structurally similar to those of humans, just smaller.

The study’s findings have major implications not just for sleep researchers but for the whole neuroscience field in general. Already evidence in mice has suggested that the glymphatic system may be pivotal in clearing out toxic proteins that cause Alzheimer’s disease, Parkinson’s disease and other devastating brain disorders.

If that’s the case, then you can add sleep loss to the growing list of risk factors for brain disease.

This study is published in Science.