Sleep is actually a very important function of and for the brain. We need to generate enough sleep to feel rested, to have energy, to assist with mood, and to even help us think more clearly.
Sleep is divided into four stages. Deep sleep or stage IV sleep is critical to brain function. With advanced age we generate less deep IV sleep and it is probably not a coincidence that our cognitive abilities change as well.
Rapid Eye Movement (REM) is the part of sleep when we dream and we are actually paralyzed. REM occupies about 25% of our sleep and is critical for encoding information to a deeper level. Our brain processes millions of bits of information daily and during REM it is thought the brain selects those bits of information that are most critical.
Debate on how much sleep is necessary continues, but it is probably safe to say that young children need at least 8 hours of sleep a day while adults should get more than 6. Certainly, these numbers are not fixed and there are cases where some do fine with only a few hours while others do not. The bottom line is that our brains need sleep, deep sleep, and REM to function efficiently.