Sleep serves many physiological and psychological purposes. It is essentially a reset button for your organs and brain.
When you sleep your brain is working, it is processing information it received during the day.
When we sleep we are also resolving the psychological problems that we are facing; some of which are expressed in our dreams. [full artcle]