Maintaining alertness is critical for safe and successful performance of most human activities. Consequently, microsleeps during continuous visuomotor tasks, such as driving, can be very serious, not only disrupting performance but sometimes leading to injury or death due to accidents. We have investigated the neural activity underlying behavioral microsleeps – brief (0.5–15 s) episodes of complete failure to respond accompanied by slow eye-closures – and EEG theta activity during drowsiness in a continuous task. Twenty healthy normally-rested participants performed a 50-min continuous tracking task while fMRI, EEG, eye-video, and responses were simultaneously recorded. Visual rating of performance and eye-video revealed that 70% of the participants had frequent microsleeps. fMRI analysis revealed a transient decrease in thalamic, posterior cingulate, and occipital cortex activity and an increase in frontal, posterior parietal, and parahippocampal activity during microsleeps. The transient activity was modulated by the duration of the microsleep. In subjects with frequent microsleeps, power in the post-central EEG theta was positively correlated with the BOLD signal in the thalamus, basal forebrain, and visual, posterior parietal, and prefrontal cortices. These results provide evidence for distinct neural changes associated with microsleeps and with EEG theta activity during drowsiness in a continuous task. They also suggest that the occurrence of microsleeps during an active task is not a global deactivation process but involves localized activation of fronto-parietal cortex, which, despite a transient loss of arousal, may constitute a mechanism by which these regions try to restore responsiveness. Hum Brain Mapp 35:257–269, 2014. © 2012 Wiley Periodicals, Inc.