While forgeting might be one of the effects that happens it is certainly not the main purpose of sleep.
If you forbid people to sleep long enough they die and nobody knows why (not counting microsleeps). Fatal Famililal Insomnia is erm.... fatal. Its certainly not because you didn't forget. You can use alternatives for that, such as boosting endocanabinoid system. THC in mices also make them forget stresfull events in life and vice versa (blocking CB1 receptor makes them remember). There is strong anecdotal evidence that it happens in all human consumers too. Also, there are few people that can never forget [1], one depicted in House MD episode and those people sleep and I bet they would still die if they didn't.
All those facts do not align in my mind with above stated hypothesis.
AFAIK, some neural pathways get improved during the sleep while others are pruned. That sounds more like a brain is in a maintenance mode, filtering out irrelevant stuff from important (among other things that might happen).