Attentional lapses are ubiquitous and can negatively impact performance. They correlate with mind wandering, or thoughts that are unrelated to ongoing tasks and environmental demands. In other cases, the stream of consciousness itself comes to a halt and the mind goes blank. What happens in the brain that leads to these mental states? To understand the neural mechanisms underlying attentional lapses, we cross-analyzed the behavior, subjective experience and neural activity of healthy participants performing a task. Random interruptions prompted participants to indicate whether they were task-focused, mind-wandering or mind-blanking. High-density electroencephalography revealed the occurrence of spatially and temporally localized sleep-like patterns of neural activity. This “local sleep” accompanied behavioral markers of lapses and preceded reports of mind wandering and mind blanking. Furthermore, the location of local sleep distinguished sluggish versus impulsive behaviors, mind wandering versus mind blanking. Despite contrasting cognitive profiles, attentional lapses could share a common physiological origin: the appearance of local islets of sleep within the awake brain.