Although continued total sleep deprivation is fatal, the function of sleep remains a mystery. Shorter durations of sleep deprivation are followed by rebound increases in non-rapid eye movement (non-REM) sleep, suggesting a homeostatic control. Measurements of the power spectrum of the electroencephalograph (EEG) suggest that a more accurate marker of the homeostasis may be delta frequency power, because it most closely reflects the duration of the preceding sleep deprivation. Several lines of evidence suggest a link with complex metabolic processes. These include a local homeostatic factor, adenosine, that inhibits neuronal activity in response to increases in the ratio of energy demand to metabolite availability. Other evidence derives from the relationship of circadian genes, NPAS2 and Clock, to metabolism. Additionally, at a systems level, hypocretin/Orexin may coordinate motor activity with feeding. A loss of hypocretin neurons or a mutation of the genes controlling this peptide system can result in the sleep disorder narcolepsy. Finally, evidence for a role of non-REM sleep in developmental central nervous system (CNS) plasticity, as well as learning and memory, is discussed.