The most obvious cortical states are sleep and wakefulness. All animals exhibit a restorative cycle of rest following daily activity, but only mammals divide the period of rest into distinct phases of non-REM and REM sleep. Why humans (and many other animals) need a restorative phase of suspended consciousness accompanied by decreased metabolism and lowered body temperature is not known. Even more mysterious is why the human brain is periodically active during sleep at levels not appreciably different from those of the waking state (that is, the neural activity during REM sleep). The highly organized sequence of human sleep states is actively generated by nuclei in the brainstem, most importantly the cholinergic nuclei of the pons–midbrain junction, the noradrenergic cells of the locus coeruleus, and the serotonergic neurons of the raphe nuclei. This control by the brainstem of the cortical states is mediated by modulation of activity in a thalamocortical loop. This complex physiological interplay involving brainstem, thalamus, and cortex controls the degree of mental alertness on a continuum from deep sleep to waking attentiveness. A circadian clock located in the suprachiasmatic nucleus and the hypothalamus in turn influences these systems, adjusting cortical and other physiological states to appropriate durations during the 24-hour cycle of light and darkness that is fundamental to life on Earth. Exploring consciousness as something that cannot be reduced to wakefulness raises the more difficult questions including its neural correlates, if they exist as distinct from wakefulness and attention; whether animals are conscious in the same way we are; and whether machines can be conscious. More tractable is the puzzling question of why large regions of the cortex are more active at rest than when a subject is carrying a task.