You probably don't think twice about what happens to your brain when you sleep, and even though you are resting, thankfully your brain is still working hard for you.

A new study led by Boston University scientists has discovered that the brain waves generated right before our deep sleep phase triggers a 'cleaning' fluid. This fluid protects our brain from toxins associated with neurodegenerative diseases such as Alzheimer's.

RELATED: ALZHEIMER'S DESTROYS NEURONS THAT KEEP US AWAKE, FINDS NEW STUDY

The brain during sleep

When we sleep our brain goes through a number of different phases. Sometimes we're in light slumber, and other times we go through deep sleep and rapid eye movement (REM) sleep. Laura Lewis, co-author of the Boston University study and her colleagues focused on the non-REM sleep phase, one that usually happens at the start of our night.

Lewis and her team ran tests on volunteers. The researchers were curious about how toxins clear out of brains during sleep, and why this process happens when we are asleep.

Lewis suspected that the cerebrospinal fluid (CSF), a clear water-like fluid, that flows around our brain may be part of the process.

During deep sleep, waves of cerebrospinal fluid (blue) coincide with temporary decreases in blood flow (red). Source: Laura Lewis/Boston University

During the tests, the research team asked their volunteers to lie down in an MRI machine and fall asleep. This sounds a lot simpler than it actually is. MRI machines make quite a bit of noise, and when your head is plugged up to different scanners and tubes, falling asleep in this alien environment is no easy feat.

Once the volunteers were asleep, however, the team was able to gather enough information to show that "during sleep, there are these really large, slow waves occurring maybe once every 20 seconds of CSF washing into the brain," Lewis said.

Earlier studies on mice previously demonstrated how CSF increased when they slept and removed many toxins, some of which are linked to Alzheimer's disease. Now that Lewis' team has discovered this also takes place in humans, this could make for some big changes in the medical world.

From this, the team was able to make another discovery — that an electrical wave triggered each cycle.

"Before each wave of fluid, we would actually see a wave of electrical activity in the neurons," Lewis said. "This electrical wave always happens first, and the CSF wave always seems to follow seconds later."

This brain wave is very similar to a 'slow-wave,' which is when a person enters a deep sleep cycle, or REM sleep. Both of these sleep phases are linked to memory and brain disease.

"It's already known that people with Alzheimer's disease have less of these electrophysiological slow waves, so they have smaller and fewer slow waves," stated Lewis.

So, by having fewer slow waves, the brain would not be able to clear out the toxins associated with Alzheimer's, and other neurodegenerative diseases.

However, Alzheimer's is not only linked to one cause. That said, this discovery is certainly a step in the right direction, proving that more focus needs to happen on understanding our sleep patterns.

The study was published on Thursday in Science.