It's easy to get distracted - whether you're daydreaming about a special someone while you should be working, or completely going blank and just taking a brain break.

Now, scientists have gained a better idea of what actually happens in our brains when we 'zone out', and it looks a lot like a part of the brain is… sort-of falling asleep.

"Attentional lapses occur commonly and are associated with mind wandering, where focus is turned to thoughts unrelated to ongoing tasks and environmental demands, or mind blanking, where the stream of consciousness itself comes to a halt," the team – led by neuroscientist Thomas Andrillon – wrote in their new paper.

"Our results suggest attentional lapses share a common physiological origin: the emergence of local sleeplike activity within the awake brain."

When you go to sleep, your brain experiences 'slow waves' of brain activity in the delta (1–4 Hz) or theta (4–7 Hz) ranges during non-rapid eye movement sleep. This is the slow descent before you get to the deep, dream-filled rapid eye movement (REM) sleep.

In contrast, there's this 'sleeplike activity' while you're awake – called local sleep by scientists. It's relatively well studied by researchers and it happens while you're completely awake, but localized brain activity enters a state which resembles sleep.

There are pretty specific times when we know that local sleep happens, particularly when we're really, really tired. But the researchers discovered something that looks very similar to local sleep in well-rested volunteers when their minds were wandering or blanking.

"The concept of local sleep builds upon a recent questioning of the classical view of sleep as an all-or-nothing phenomenon," the team explained.

The researchers took 26 healthy and well-rested participants and took readings of their brain waves using an electroencephalogram (EEG). They made the subjects partake in what might be one of the most boring tests in science, called a Go/NoGo test.

It goes like this. The volunteers stared at images of faces or numbers that changed every second or so for over an hour, pressing a button (Go) when they saw neutral faces or any number other than three, but not pressing the button (NoGo) when they saw a smiling face or the number three. Every 30 to 60 seconds they were interrupted to report on their mental state.

Unsurprisingly, there were a lot of brains wandering off the task.

"The Go/NoGo tests require participants' sustained attention, but our participants declared focusing on the task only in ~48 percent of the probes," the team wrote.

"The rest of the time, they declared thinking about something else or thinking about nothing."

When the researchers looked at the preceding 20 seconds before the participants said that their mind had wandered off, the EEG recorded a particular type of slow wave in localized areas of the brain, similar to what is seen across someone's entire brain when they're falling asleep.

Interestingly, while slow waves in areas at the front of the brain preceded mind wandering, when they occurred in regions farther back in the brain, the detection was followed by the participants reporting a blank mind.

"We speculate that the slow waves we report here are generated by similar neural mechanisms as slow waves in sleep," the researchers wrote.

"Future studies could use direct evidence from intracranial recordings or sleep deprivation to more solidly establish this interpretation."

The brain is a tricky organ, and we don't yet know if this really is the same as what happens in sleep, or just our meat engines finding some other way of giving ourselves a rest.

Watch this space, and maybe have a daydream in the meantime.

This research has been published in Nature Communications.