The mammalian brain oscillates through three distinct global activity states: wakefulness, non-rapid eye movement (NREM) sleep and REM sleep. The regulation and function of these ‘vigilance’ or ‘behavioural’ states can be investigated over a broad range of temporal and spatial scales and at different levels of functional organization, i.e. from gene expression to memory, in single neurons, cortical columns or the whole brain and organism. We summarize some basic questions that have arisen from recent approaches in the quest for the functions of sleep. Whereas traditionally sleep was viewed to be regulated through top-down control mechanisms, recent approaches have emphasized that sleep is emerging locally and regulated in a use-dependent (homeostatic) manner. Traditional markers of sleep homeostasis, such as the electroencephalogram slow-wave activity, have been linked to changes in connectivity and plasticity in local neuronal networks. Thus waking experience-induced local network changes may be sensed by the sleep homeostatic process and used to mediate sleep-dependent events, benefiting network stabilization and memory consolidation. Although many questions remain unanswered, the available data suggest that sleep function will best be understood by an analysis which integrates sleep’s many functional levels with its local homeostatic regulation.