Quiescence, or a sleep-like state, is a common and important feature of the daily lives of animals from both invertebrate and vertebrate taxa, suggesting that sleep appeared early in animal evolution. Recently, Drosophila melanogaster has been shown to be a relevant and powerful model for the genetic analysis of sleep behaviour. The sleep architecture of D. melanogaster is sexually dimorphic, with females sleeping much less than males during day-time, presumably because reproductive success requires greater foraging activity by the female as well as the search for egg-laying sites. However, this loss of sleep and increase in locomotor activity will heighten the risk for the female from environmental and predator hazards. In this study, we show that virgin females can minimize this risk by behaving like males, with an extended afternoon 'siesta'. Copulation results in the female losing 70 per cent of day-time sleep and becoming more active. This behaviour lasts for at least 8 days after copulation and is abolished if the mating males lack sex peptide (SP), normally present in the seminal fluid. Our results suggest that SP is the molecular switch that promotes wakefulness in the post-mated female, a change of behaviour compatible with increased foraging and egg-laying activity. The stress resulting from SP-dependent sleep deprivation might be an important contribution to the toxic side-effects of male accessory gland products that are known to reduce lifespan in post-mated females.