The function of sleep is still a topic of debate. Some argue that we sleep because being awake causes a disruption in the natural homeostasis in our body, and that sleeping restores our body physiology back to “neutral.” This theory, put forward by Oswald in the 60s, states that recovery of the brain is a physiological necessity that occurs during sleep.
Cellular repair mechanisms are enhanced while sleeping. For example, growth hormone production is enhanced during phases of deep sleep. Growth hormone triggers mitosis and enhanced cell reproduction. In theory, this serves to repair damage sustained during wake. This theory is coupled with the observation that subjects slept longer for the two nights following strenuous exercise. (Slow-wave sleep: a recovery period after exercise)
The sleep-dependent increase in glymphatic system function is one piece of evidence supporting the restorative function of sleep theory. During sleep, the interstitial space between brain cells increases, and cell size decreases. This allows cerebrospinal fluid to flow more freely between the cells before being drained. Metabolic waste products accumulate during wake, and the enhanced function of the glymphatic system during sleep helps clear away these waste products. The activity of the glymphatic system is known to clear away beta-amyloid plaques from the interstitial space, a protein that is associated with Alzheimer's disease.