Organisms perceive changes in their dietary environment and enact a suite of behavioral and metabolic adaptations that can impact motivational behavior, disease resistance, and longevity. However, the precise nature and mechanism of these dietary responses is not known. We have uncovered a novel link between dietary factors and sleep behavior in Drosophila melanogaster. Dietary sugar rapidly altered sleep behavior by modulating the number of sleep episodes during both the light and dark phase of the circadian period, independent of an intact circadian rhythm and without affecting total sleep, latency to sleep, or waking activity. The effect of sugar on sleep episode number was consistent with a change in arousal threshold for waking. Dietary protein had no significant effect on sleep or wakefulness. Gustatory perception of sugar was necessary and sufficient to increase the number of sleep episodes, and this effect was blocked by activation of bitter-sensing neurons. Further addition of sugar to the diet blocked the effects of sweet gustatory perception through a gustatory-independent mechanism. However, gustatory perception was not required for diet-induced fat accumulation, indicating that sleep and energy storage are mechanistically separable. We propose a two-component model where gustatory and metabolic cues interact to regulate sleep architecture in response to the quantity of sugar available from dietary sources. Reduced arousal threshold in response to low dietary availability may have evolved to provide increased responsiveness to cues associated with alternative nutrient-dense feeding sites. These results provide evidence that gustatory perception can alter arousal thresholds for sleep behavior in response to dietary cues and provide a mechanism by which organisms tune their behavior and physiology to environmental cues.