Brain optimally utilizes resources to resist mental fatigue during the prolonged period of cognitive activity. Neural mechanisms underlying long-term cognitive performance remain unknown. We show that during the 40-minutes visual stimuli classification task, subjects improve behavioral performance in terms of response time and correctness. We observe that the prestimulus θ and α power grows during the experiment manifesting the mental fatigue. The prestimulus β power, in its turn, increases locally in the region, engaged in the ongoing stimulus processing, that may reflect the neuronal adaptation. Our results evidence that the neuronal adaptation is enhanced in the course of the experiment reducing the cognitive demands required to activate the stimulus-related brain regions.