For most of our history, humans have thought of sleep is a time when the brain is turned off. That when we went to sleep our minds went blank and mental activity stopped. It certainly appears that way when you look at someone who is asleep and it is easy to see why the ancients thought this way.
However, the truth is actually very different. In the past fifty or so years, scientists have discovered that there is a lot of brain activity while we are asleep, that in fact, the brain is far from switched off.
When we first go to sleep, there is a significant drop in the firing rate of the neurons. As we move from wakefulness to non-REM sleep, brain activity does drop, but when we move through the stages of non-REM sleep up to REM sleep, we see an increase in brain activity. In fact, during periods of REM sleep our brain is often as active as it is when it is awake. Unsurprisingly, REM sleep is the time when we have our most vivid dreams.
This new knowledge about brain activity has changed the way scientists see sleep. They used to think that it was a time for mental and physical recuperation, but with this and other research, they now believe that one of its most important functions is cognitive. That it provides a time for the brain to process memories and thoughts.