Sleep is present and tightly regulated in every vertebrate species in which it has been carefully investigated, but what sleep is for remains a mystery. Sleep is also present in invertebrates, and an extensive analysis in Drosophila melanogaster has shown that sleep in fruit flies shows most of the fundamental features that characterize sleep in mammals. In Drosophila, sleep consists of sustained periods of quiescence associated with an increased arousal threshold. Fly sleep is modulated by several of the same stimulants and hypnotics that affect mammalian sleep. Moreover, like in mammals, fly sleep shows remarkable interindividual variability. The expression of several genes involved in energy metabolism, synaptic plasticity, and the response to cellular stress varies in Drosophila between sleep and wakefulness, and the same occurs in rodents. Brain activity also changes in flies as a function of behavioral state. Furthermore, Drosophila sleep is tightly regulated in a circadian and homeostatic manner, and the homeostatic regulation is largely independent of the circadian regulation. After sleep deprivation, recovery sleep in flies is longer in duration and more consolidated, indicated by an increase in arousal threshold and fewer brief awakenings. Finally, sleep deprivation in flies impairs vigilance and performance. Because of the extensive similarities between flies and mammals, Drosophila is now being used as a promising model system for the genetic dissection of sleep. Over the last few years, mutagenesis screens have isolated several short sleeping mutants, a demonstration that single genes can have a powerful effect on a complex trait like sleep.