Tonight, as you close your eyes in bed, something strange will happen to you: your mind will drift from an ordinary thought to a dream, but it will be impossible to say exactly when it happened. We tend to imagine that the boundary between being asleep and awake is clear: when we are awake, we think; when we are asleep, we dream. Yet, in our study, published in Cell Reports, we show that this boundary is more porous than you think. You can dream before falling asleep, and plan your day ahead after drifting off.From thought to dream and everything in betweenThink about what it means to be awake. Right now, as you read these lines: sounds reach you, light falls on you, fabric touches your skin. You are anchored in the world. Sleeping is somewhat the opposite. You are still, cut off from the outside world and inhabited by experiences constructed from within: dreams.Between the two, there is a lapse of time. We do not switch from one state to the other, like flipping a light switch. It is a gradual transition in which brain activity slows down, muscles relax, breathing deepens. And the mind does not cease to function; it takes on other forms by producing thoughts related to the day or the day ahead, fleeting images, a few scraps of music, fragments of dreams… Researchers call this half-awake, half-asleep state of consciousness “hypnagogia”.The problem is that these experiences are fleeting and ever-changing, hard to report, and even harder to classify. How do we move from “What am I going to eat tomorrow?” to “I am sitting on a train moving underwater”? Until now, researchers have tried to sort them into categories based on what they are (“This one seems bizarre, it must be a dream”) or on when they occur (“I exclude anything that happens during wakefulness”). The result: we knew that a multitude of experiences pass through the mind during the sleep onset period, but without being sure which ones, nor when or how the brain produces them. That is exactly what we set out to understand.Letting the data speakTo get a clearer picture, we had to abandon predefined categories and let the data speak. We recorded the brain activity of 103 participants while they took a nap in the lab, using electroencephalography, or EEG: electrodes were placed across the scalp to capture neural signals and make it possible to distinguish wakefulness (fast alpha waves) from light sleep (slower theta and sigma waves, with sudden very slow waves and brief rhythmic bursts called sleep spindles).We interrupted them with a sound at several intervals and asked a very simple question: “What was going through your mind just before the alarm?” Then we asked them to rate their experience along four dimensions: how bizarre (and non-ordinary), how fluid and continuous (or, on the contrary, fragmented) and how spontaneous it was (without voluntary control), as well as their impression of being awake or asleep.In total, we collected 375 experiences during the sleep onset period. Rather than deciding ourselves what counted as a dream or a waking thought, we used a Machine Learning algorithm to group these experiences into “mental states” without defining in advance what they were supposed to be.Taking the participants’ ratings on all four dimensions into account, the algorithm searched for groups of experiences that resembled one another – a bit as if it were looking for “families” on a four-coordinate map. Broadly speaking: fragments of memory (“an image of my father came to mind”), thoughts related to the surroundings (“I was listening to the sounds of the street”), dream-like imagery (“I was seeing little aliens”), and deliberate reflections (“I was thinking about what I was going to do tomorrow”).The next question followed naturally: at what point between wakefulness and sleep does each of these states arise?Dreaming while awake, thinking while asleepThis is where the results become surprising. We expected a simple scenario: rational thoughts during wakefulness, bizarre imagery during sleep. And some patterns did go in that direction: as people fell fast asleep, the mental state linked to the surroundings and the one linked to deliberate reflection became rarer.But here is the core of our discovery: all four states appeared across the board – during wakefulness, sleep onset (stage N1), and in more established sleep (stage N2). What passes through our mind is not dictated by whether we are awake or asleep.In practice, some cases turned out to be, frankly, paradoxical. One participant, who was perfectly awake (alpha waves on the EEG, a signature of wakefulness), reported: “Ants were climbing on me with crossword puzzles in the background.” Another participant asleep in stage N2 (sudden large slow waves on the EEG recording, a classic marker of sleep) simply said: “I was thinking about work.” We dream before falling asleep; we reflect while asleep.One point still needed clarifying: the brain does not function in the same way during wakefulness and sleep; during sleep, it slows down, it becomes synchronised. So how can a dream-like experience arise both in wakefulness and in sleep? To understand this, we zoomed in: shorter time windows to capture rapid shifts in brain waves, 64 electrodes to cover the cortex precisely, and finer metrics of brain signals than those traditionally used.We found brain signatures of mental states. Dream-like imagery, for example, was accompanied by weaker communication between distant brain regions, as if these areas of the brain were less able to talk to one another. The key point: these signatures were the same whether the person was awake or asleep. In other words, the brain can produce the same type of mental experience regardless of the state of vigilance.How about you? What goes through your mind as you fall asleep? These results pose the following equally interesting questions: Do all people have the same mental experiences? In the same order? And does this tell us something about who we are?To find out, we designed Drifting Minds, an online questionnaire of about twenty minutes that explores your mental experiences during the sleep onset period. Close to 5 000 people across five continents have already taken part. The goal is to identify sleep-onset profiles in the population and to see whether they depend on age, sex, and culture, but also whether they are linked to traits such as creativity, anxiety, mental imagery ability, or sleep quality.At the end of the questionnaire, you discover your own sleep onset profile and can compare yourself with others. Take part here!Deep down what we are trying to do is understand what the brain generates in this “in between” zone, and what it says about us. So tonight, as you close your eyes, you will once again pass through that strange corridor. Pay attention to that moment and what’s going through your mind just before you drift off… A weekly e-mail in English featuring expertise from scholars and researchers. It provides an introduction to the diversity of research coming out of the continent and considers some of the key issues facing European countries. Get the newsletter!Delphine Oudiette received financing from the European Union funded (ERC consolidator grant) Horizon Europe program.Nicolas Decat ne travaille pas, ne conseille pas, ne possède pas de parts, ne reçoit pas de fonds d'une organisation qui pourrait tirer profit de cet article, et n'a déclaré aucune autre affiliation que son organisme de recherche.