Human performance is modulated by circadian rhythmicity and homeostatic sleep pressure. Whether and how this interaction is represented at the regional brain level has not been established. We quantified changes in brain responses to a sustained-attention task during 13 functional magnetic resonance imaging sessions scheduled across the circadian cycle, during 42 hours of wakefulness and after recovery sleep, in 33 healthy participants. Cortical responses showed significant circadian rhythmicity, the phase of which varied across brain regions. Cortical responses also significantly decreased with accrued sleep debt. Subcortical areas exhibited primarily a circadian modulation that closely followed the melatonin profile. These findings expand our understanding of the mechanisms involved in maintaining cognition during the day and its deterioration during sleep deprivation and circadian misalignment.