As routine and lower demand cognitive tasks are taken over by automated assistive systems, human operators are increasingly required to sustain cognitive demand over long periods of time. This has been reported to have long term adverse effects on cardiovascular and mental health. However, it remains unclear whether prolonged cognitive activity results in a monotonic decrease in the efficiency of the recruited brain processes, or whether the brain is able to sustain functions over time spans of one hour and more. Here, we show that during working sessions of one hour or more, contrary to the prediction of a monotonic decline, behavioral performance in both humans and non-human primates consistently fluctuates between periods of optimal and suboptimal performance at a very slow rhythm of circa 5 cycles per hour. These fluctuations are observed in both high attentional (in non-human primates) and low attentional (in humans) demand conditions. They coincide with fluctuations in pupil diameter, indicating underlying changes in arousal and information-processing load. Accordingly, we show that these rhythmic behavioral fluctuations correlate, at the neurophysiological level, with fluctuations in the informational attention orientation and perception processing capacity of prefrontal neuronal populations. We further identify specific markers of these fluctuations in LFP power, LFP coherence and spike-field coherence, pointing towards long-range rhythmic modulatory inputs to the prefrontal cortex rather than a local prefrontal origin. These results shed light on the resilience of brain mechanisms to sustained effort and have direct implications on how to optimize high cognitive demand working and learning environments.