When Thomas Edison couldn’t quite figure out an invention, the legend goes, he’d collapse into his favourite chair with a steel ball in his hand and try to fall asleep. The second his muscles relaxed — in that period just before deep sleep — the ball would fall to the ground with a loud thud. He’d wake up, suddenly convinced of how to solve his problem and go complete the invention.

That “just-before period” is more formerly known as the “hypnagogic state.” For years, it’s been associated with some of history’s foremost modern thinkers (Albert Einstein and Salvador Dalí practised similar methods to Edison), but research into the phenomenon has been limited. There’s a vague understanding that dipping in and out of the hypnagogic state might be able to boost creativity, but scientists didn’t really know how or why.

In fact, most people associate hypnagogia, which is officially defined as the transitional state of consciousness between wakefulness and sleep with hallucinations — “involuntary and imagined experiences” are known to spike at this time, as brain activity increases in abstract ways. For some, this can be unpleasant (i.e. the sensation that someone’s in the room with you). For others (like me), it eases the specter of insomnia. If I’m starting to tie together a string of wackadoodle thoughts, I know sleep is on the way.

The Paris Brain Institute sought to investigate the hypnagogic state, and recruited 100 volunteers for a pretty simple experiment: they were tasked with solving a series of math problems, using a purposely circuitous method. They were not told that there was a far simpler way to solve the problems. Not long into the experiment, 16 volunteers figured out the easier alternative. The rest of them were put to rest in a chair while holding a plastic cup.

Once the cup fell out of their hands, they were asked to A) report whatever they’d been thinking about in their in-between resting state and B) get back to work on solving the math problems. They all wore EEG headsets, so the authors could monitor which ones bypassed hypnagogia straight to deep sleep.

The results? They were dream-thinking a bunch of nonsense: as Freethink reports, “horses in hospitals, dancing numbers, etc.” However, after a number of trials, they were far more likely to find the shortcut to finishing the math problems. First author Célia Lacaux wrote, “Spending at least 15 seconds in this very first [hypnagogic] phase of sleep after falling asleep tripled the chances of finding this hidden rule, through the famous ‘Eureka! This effect disappeared if the subjects went deeper into sleep.”

You’ve probably experienced this at various points in your life. Maybe you’ve opted for a midday WFH nap, and not fallen fully asleep, but felt better equipped to tackle a challenging email afterwards. Or you’ve been about to drift off to sleep at nighttime when a creak from the pipes wakes you up — and you have an epiphany about how to best tackle the next day’s challenge. Plugging them into your every day on purpose takes a special level of dedication and purpose, but then, maybe that’s why Edison, Einstein and Dalí are some of the most creative minds we’ve ever had.

If you’re interested in learning more about the nitty-gritty neurons of it all, head here to learn more about “alpha and delta waves.” And trust that this is far from the last time we’ll hear about hypnagogia research.