The function of sleep in mammal and other vertebrates is one of the great mysteries of biology. Many hypotheses have been proposed, but few of these have made even the slightest attempt to explain the essence of sleep - the uncompromising need for reversible unconsciousness. During sleep, epiphenomena - often of a somatic character - occur, but these cannot explain the core function of sleep. One answer could be hidden in the observations made for long periods of time of the function of the central nervous system (CNS). The CNS is faced with conflicting requirements on stability and excitability. A high level of excitability is desirable, and is also a prerequisite for sensitivity and quick reaction times; however, it can also lead to instability and the risk of feedback, with life-threatening epileptic seizures. Activity-dependent negative feedback in neuronal excitability improves stability in the short term, but not to the degree that is required. A hypothesis is presented here demonstrating how calibration of individual neurons - an activity which occurs only during sleep - can establish the balanced and highest possible excitability while also preserving stability in the CNS. One example of a possible mechanism is the observation of slow oscillations in EEGs made on birds and mammals during slow wave sleep. Calibration to a genetically determined level of excitability could take place in individual neurons during the slow oscillation, so that action potentials are generated during the oscillations “up-phase”. This can only take place offline, which explains the need for sleep. The hypothesis can explain phenomena such as the need for unconsciousness during sleep, with the disconnection of sensory stimuli, slow EEG oscillations, the relationship of sleep and epilepsy, age, the effects of sleep on neuronal firing rate and the effects of sleep deprivation and sleep homeostasis. This is with regard primarily to mammals, including humans, but also all other vertebrates.