A theory of sleep function and brain organization positing that sleep serves a neuronal connectivity function and is a fundamental property of highly interconnected groups of neurons (neuronal groups) is presented. Cellular electrical activity within neuronal groups leads to the production of sleep-promoting substances which are also cytokine growth factors. The somnogenic cytokine growth factors (SCGF) in turn, induce molecules necessary for synaptic connectivity. The SCGFs change the synaptic activation patterns within neuronal groups. SCGFs thus induce changes in the input-output relationships of neuronal groups and thereby, cause a neuronal group state shift. Altered input-output relations result in increased efficacy of some synapses. Sleep is thus, targeted to active neuronal groups and serves to incorporate novel stimulus patterns into a synaptic contextual network and also to preserve that network. Coordination of neuronal group state is brought about by sleep regulatory networks. Organism sleep is an emergent property of a population of neuronal groups in the sleep state. After the neuronal group state shift, environmental input is divorced from output. Sleep is thus, useful to keep the animal stationary at a time when its brain is most dysfunctional. Thus, not only is unconsciousness needed because output activity would be out of phase with environmental events, but it is the consequence of the process itself.