The average human spends 26 years of life sleeping. That's a lot of z's, and for what? Interestingly, the question of why we sleep is one of the great mysteries of biology.

Most theorists believe that sleep is of particular importance to the health of the brain or the nervous system. After all, the effects of sleep deprivation usually take a mental toll, often in the form of memory loss, hallucinations or even seizures. Sleep deprivation takes a physical toll on your brain, too, according to a new study published in the Journal of Neuroscience. It turns out your brain eats itself when you don't get enough sleep. New Scientist reports:

The brain cells that destroy and digest worn-out cells and debris go into overdrive in mice that are chronically sleep-deprived. In the short term, this might be beneficial – clearing potentially harmful debris and rebuilding worn circuitry might protect healthy brain connections. But it may cause harm in the long term, and could explain why a chronic lack of sleep puts people at risk of Alzheimer’s disease and other neurological disorders, says Michele Bellesi of the Marche Polytechnic University in Italy.

A few breakthrough brain studies from the University of Wisconsin may finally offer some answers. In short, we need to sleep to remember and to forget.

Research published in July 2016 and spearheaded by Giulio Tononi of the University of Wisconsin-Madison represents the best evidence yet of what happens when we sleep, reports New Scientist. Tononi's team took slices from the brains of mice before and after sleep. They found that synapses, or connections between neurons, were 18 percent smaller when sampled after a period of sleep. In other words, it seems that the connections between neurons in our brains are being trimmed or weakened while we snooze.

It may seem anti-intuitive to think about shrinking of the brain as a good thing, but it turns out that a slimmer brain has more room the following day to make new memories, according to a February 2017 study. Researchers hypothesize that sleeping allows us to "prune" our memories and fine-tune the lessons we've learned while awake, Science Alert reports. Sleep keeps the mind open to new experiences, and to building memories of those experiences.

“Sleep is the price we pay for learning,” explained Tononi.

The theory explains why we find it harder to concentrate and learn new information when we miss a night's sleep. It's because the brain has reached its capacity, so to speak; it needs to be pruned.

Previous findings are also consistent with this theory. For instance, EEG recordings have shown that the human brain is less electrically responsive at the start of the day than at the end, suggesting that the connections may be weaker.

If Tononi's research makes you frightened to sleep for fear of having your experiences trimmed off, not to worry. The research also found that some synapses were protected from the trimming process, always remaining robust. These areas are probably where the most important memories are being stored.

“You keep what matters,” reassured Tononi.

Though naturally, that leaves open the question of what matters, and how the brain determines what matters. But that's a mystery for another day.

Editor's note: This story has been updated since it was originally published in July 2016.

Breakthrough studies may finally explain why we sleep
All animals need to sleep, but why? It's one of the great puzzles of biology, and it might finally have a solution.