Sleep loss is an adaptive response to nutrient deprivation that alters behavior to maximize the chances of feeding before imminent death. Organisms must maintain systems for detecting the quality of the food source to resume healthy levels of sleep when the stress is alleviated. We determined that gustatory perception of sweetness is both necessary and sufficient to suppress starvation-induced sleep loss when animals encounter nutrient-poor food sources. We further find that blocking specific dopaminergic neurons phenocopies the absence of gustatory stimulation, suggesting a specific role for these neurons in transducing taste information to sleep centers in the brain. Finally, we show that gustatory perception is required for survival, specifically in a low nutrient environment. Overall, these results demonstrate an important role for gustatory perception when environmental food availability approaches zero and illustrate the interplay between sensory and metabolic perception of nutrient availability in regulating behavioral state.