.-The functions of sleep and what controls it remain unanswered biological questions. According to the two-process model, a circadian process and a homeostatic process interact to regulate sleep. While progress has been made in understanding the molecular and cellular functions of the circadian process, the mechanisms of the homeostatic process remain undiscovered. We use the recently established sleep model system organism Drosophila melanogaster to examine dynamic changes in gene expression during sleep and during prolonged wakefulness in the brain. Our experimental design controls for circadian processes by killing animals at three matched time points from the beginning of the consolidated rest period [Zeitgeber time (ZT) 14)] under two conditions, sleep deprived and spontaneously sleeping. Using ANOVA at a false discovery rate of 5%, we have identified 252 genes that were differentially expressed between sleep-deprived and control groups in the Drosophila brain. Using linear trends analysis, we have separated the significant differentially expressed genes into nine temporal expression patterns relative to a common anchor point (ZT 14). The most common expression pattern is a decrease during extended wakefulness but no change during spontaneous sleep (n ϭ 114). Genes in this category were involved in protein production (n ϭ 47), calcium homeostasis, and membrane excitability (n ϭ 5). Multiple mechanisms, therefore, act to limit wakefulness. In addition, by studying the effects of the mechanical stimulus used in our deprivation studies during the period when the animals are predominantly active, we provide evidence for a previously unappreciated role for the Drosophila immune system in the brain response to stress. sleep deprivation; temporal regulation; stress SLEEP HAS BEEN OBSERVED in animal species ranging from insects to humans. We know that total sleep deprivation results in animal death (3,69,70), but the biological function of sleep remains poorly understood. With a rising prevalence of sleep restriction in our society (2, 6, 26), it becomes increasingly important to understand the function and regulation of sleep as well as the consequences of sleep deprivation on the brain.A popular conceptual framework to understand the regulation of sleep is called the two-process model. According to this model, a circadian process and a sleep-promoting (homeostatic) process, which are mechanistically distinct, interact to regulate sleep (7,8). While the cellular and molecular basis for the circadian process has been largely delineated, the homeostatic process remains poorly understood. A key feature of the homeostatic process is that the drive for sleep is proportional to the prior duration of wakefulness and that the restorative function of sleep is related to sleep time. Therefore, to understand the molecular underpinnings of the homeostatic process, wakefulness and sleep cannot be treated as single static behavioral states but, rather, as dynamic processes.To gain insight into the dynamic molecular processes th...