Until recently, sleep was something of a mystery to us. Scientists didn't know why we slept -- and they thought that when the body was at rest, the brain was, too.

Now, we know better. The brain performs a number of important activities while we're unconscious, according to new neuroscience research.

At the World Economic Forum in Davos, Switzerland, Duke University professor Dr. Murali Doraiswamy, a world-renowned psychiatrist and brain health expert, told HuffPost Rise about the key functions your brain performs while you're not awake.

"Sleep is probably the glue that ties all our health together," Doraiswamy said. "The brain actually works harder when we sleep than when we're awake."

For one, the brain undergoes a drainage process to flush out harmful toxins. It also reviews information acquired during the day and consolidates memories, according to Doraiswamy.

To learn more about what the brain does when you're sleeping, watch the video above.

More stories from the World Economic Forum 2016:

Also on HuffPost:

PHOTO GALLERY Celebrity Sleep Quotes