Based only on my own experience I feel very strongly that an important element of sleep is testing. Seeing how I would react in various situations, with a particular focus on situations in which in real life I've performed below expectation, until I seem to get it consistently right in the dream. Also testing how much I would enjoy a result I work toward or consider working toward when awake.