We’ve all been there: You’re in a long meeting where you are desperately trying to listen to your boss drone on despite the fact that you got very little sleep last night. You attempt to focus, but the only thing that seems to hold your attention is the status of your eyelids, moving slowly from open to shut. And then you finally catch yourself: You actually fell asleep in front of everyone.

In their new study, researchers from Singapore sought to discover what exactly goes on in your brain when you have a momentary snooze. Ju Lynn Ong, and a team of neuroscientists used 18 healthy subjects for their study, keeping them awake all night in a psych lab. After 22 hours with no shut-eye, Ong and her colleagues asked participants to lie in a dark brain scanner to undergo two six-minute scans. The challenge: to keep their eyes open the entire time.

Of course, the participants did doze off as researchers had hoped, but were forced back awake by a recorded message reminding them to keep their eyes open. When their eyes closed, researchers observed participants’ brain activity, which they later compared to non-drowsy participants who were told to close their eyes of their own volition. This secondary group was used to make sure the brain activity was not simply a product of the eyes closing.

The neurologists found that when participants’ eyes closed, they entered “micro-sleep,” causing activity in the thalamus to decrease. The thalamus is the gateway of the brain that filters sensory information and sends it to other, higher brain areas to be processed. In essence, when participants were closing their eyes, they were shutting down their brains to all outside information as you would during sleep.

Researchers were also shocked to find that involuntary eye closing ignited a lot of activity across the brain, despite the restfulness of participants. Most of these areas they saw fire were associated with processing sensory information, body movement, and emotions, including self-awareness and memory. Interestingly, they also saw the deactivation of the cingulate cortex, otherwise known as the “oh sh*t circuit,” that helps monitor our errors, likely making it more easy for participants to fall asleep in public. Finally, researchers observed activation in frontal and rear parts of the brain known to help us pay attention. This, however, was not observed in participants who were wakeful, and opening their eyes voluntarily.

Researchers believe this activity is connected to findings of previous studies that discovered participants who were woken from drifting off experienced a hypnagogic state. What this means is those who were temporarily snoozing described experiencing strange and vivid feelings and sights, which researchers now believe is connected to the activation of multiple brain regions associated with emotion and sensory processing. But this is not a dream state, says researchers, as participants never enter REM sleep.

Researchers also believe that the activation in regions of the brain that allow us to pay attention are consequently trying to get us to stay awake, despite our best efforts. It seems that your brain is playing just as much of a tug-of-war between rest and wakefulness as you are while you struggle to remain awake. Unfortunately, researchers did not conclude with any tips to keep you from sleeping at inopportune moments.

Source: Ong J, Kong D, Chia T, et al. Co-activated yet disconnected-Neural correlates of eye closures when trying to stay awake. PubMed. 2015.