There was a science thing several months ago about how one of the functions of sleep was to flush toxins from your brain. So you're not wrong?
Here's the NPR story on that research: http://www.npr.org/blogs/health/2013/10/18/236211811/brains-...
Was it Sleepless In America?
If it was, I think it aired again recently. I didn't realize it wasn't new.
Highly recommend watching it. Not only does sleep help your brain flush the toxins that are produced as a byproduct of your brain, but cancer can grow twice as fast in tired mice compared to well rested mice. Do yourself a favor and check it out if you haven't seen it.
I like to think of sleep as clearing my working memory: the important stuff gets saved and the cruft is cleared and, one hopes, that a bit of subconscious processing takes place.
It is so much more effective to sleep for 10 or 20 minutes and come back to a problem fresh than struggle with your brain's garbage collection for several hours.