When our brain cells perform their normal functions, they generate waste that our brains need to clear for our health. Recent research suggests that as we sleep, brain waves flush out that waste by pumping cerebrospinal fluid through our brains.
Here's an interview from NPR on the subject: