This review summarizes the brain mechanisms controlling sleep and wakefulness. Wakefulness promoting systems cause low-voltage, fast activity in the electroencephalogram (EEG). Multiple interacting neurotransmitter systems in the brain stem, hypothalamus, and basal forebrain converge onto common effector systems in the thalamus and cortex. Sleep results from the inhibition of wake-promoting systems by homeostatic sleep factors such as adenosine and nitric oxide and GABAergic neurons in the preoptic area of the hypothalamus, resulting in large-amplitude, slow EEG oscillations. Local, activity-dependent factors modulate the amplitude and frequency of cortical slow oscillations. Non-rapid-eye-movement (NREM) sleep results in conservation of brain energy and facilitates memory consolidation through the modulation of synaptic weights. Rapid-eye-movement (REM) sleep results from the interaction of brain stem cholinergic, aminergic, and GABAergic neurons which control the activity of glutamatergic reticular formation neurons leading to REM sleep phenomena such as muscle atonia, REMs, dreaming, and cortical activation. Strong activation of limbic regions during REM sleep suggests a role in regulation of emotion. Genetic studies suggest that brain mechanisms controlling waking and NREM sleep are strongly conserved throughout evolution, underscoring their enormous importance for brain function. Sleep disruption interferes with the normal restorative functions of NREM and REM sleep, resulting in disruptions of breathing and cardiovascular function, changes in emotional reactivity, and cognitive impairments in attention, memory, and decision making.