Sleep, a reversible quiescent state found in both invertebrate and vertebrate animals, disconnects animals from their environment and is highly regulated for coordination with wakeful activities, such as reproduction. The fruit fly, Drosophila melanogaster, has proven to be a valuable model for studying the regulation of sleep by circadian clock and homeostatic mechanisms. Here, we demonstrate that the sex peptide receptor (SPR) of Drosophila, known for its role in female reproduction, is also important in stabilizing sleep in both males and females. Mutants lacking either the SPR or its central ligand, myoinhibitory peptide (MIP), fall asleep normally, but have difficulty in maintaining a sleep-like state. Our analyses have mapped the SPR sleep function to pigment dispersing factor (pdf) neurons, an arousal center in the insect brain. MIP downregulates intracellular cAMP levels in pdf neurons through the SPR. MIP is released centrally before and during night-time sleep, when the sleep drive is elevated. Sleep deprivation during the night facilitates MIP secretion from specific brain neurons innervating pdf neurons. Moreover, flies lacking either SPR or MIP cannot recover sleep after the night-time sleep deprivation. These results delineate a central neuropeptide circuit that stabilizes the sleep state by feeding a slow-acting inhibitory input into the arousal system and plays an important role in sleep homeostasis.