Once, studying dreams was the domain of mystics, prophets, and a certain sex-obsessed Austrian psychoanalyst. With neuroimaging techniques and better technology, dreams have become a focus of scientific research, from efforts to record dreams to studies investigating how lucid dreaming might be beneficial to mental health.

Journalist Alice Robb is the author of Why We Dream: The Transformative Power of Our Nightly Journey. The Verge spoke with Robb about theories of dreams, the most provocative studies, and the many questions that remain in the field.

This interview has been lightly edited for clarity.

Can you start by giving me a brief intellectual history of dreams? Before our modern scientific understanding, what were people’s theories of dreams?

If you look throughout history, you see people taking dreams really seriously. Dream diaries are some of the oldest examples of literature, and dreams in the Bible are often treated as prophetic. In the late 19th and early 20th century, Freud comes along and puts dreams at the center of psychoanalysis, arguing that they’re the royal road to the unconscious, and analysts should ask patients about them, and by unpacking them, you can get to the core of a patient’s issues. You see the idea taking off. On the flip side, Freud also said that dreams are all about sex — “a room represents a woman because it has an entrance” — which perhaps didn’t do dreams a favor.

Another part of the story is that the science of sleep is relatively new. Rapid-eye movement (REM) sleep was only discovered in the 1950s. And until then, most scientists thought that sleep was just a time when your brain turned off, and there wasn’t much to study. Or even if there was, they didn’t have a way to study it. So a big part of the story is also advances in technology and neuroimaging enabling us to study sleep and dreams. And now, you see people becoming much more aware of sleep as important for health, and so dreams and sleep are going to the lab.

From a very reductionist, neuroscientific point of view, what’s happening in the brain when we dream? What’s the difference between dreams at night and daydreaming and fantasy?

It’s time when the frontal lobe, the logic centers, are less activated. There’s less rational thinking. At the same time, dopamine is surging and people are often having intense emotional experiences.

Daydreaming, mind wandering, night dreaming — you can think of them as all on a spectrum. They are all involving the default mode network, the part of the brain that gets involved when everything else has quieted down, and you’re not actively engaged in something. Both mind-wandering and daydreams are involving the medial prefrontal cortex and medial temporal lobe. During REM dreams, you’re also the visual cortex so you’re having these more intensely visual experiences. Sight is the sense that’s more involved than, say, hearing or smell or touch.

Do people really smell things in dreams? I don’t believe I have, though I also generally have a weak sense of smell.

I do think smell is rare in dreams. I don’t have a stat off the top of my head, but dreams are predominantly visual, even for people who are blind, depending on what age they lost their sight. If they lost their sight after around the age of five, they can experience sight in dreams.

Nowadays, what are the main psychological theories for dreams? I’m assuming Freud is no longer in fashion?

Certain ideas of Freud’s have been borne out. One idea is that you are dreaming about things you are suppressing during the day, and there is actually research on something called the “dream rebound effect.” The psychologist Daniel Wegner found that if people were told not to focus on something before going to bed, they’re more likely to dream about it. He told one group of students to focus on a target person before bed and told another group of students about this target person and found that the group that was trying to avoid those thoughts were actually reporting more dreams about the person.

There’s a theory from evolutionary psychology that’s pretty popular, and it argues that dreams have a survival function. They give us a chance to practice for things we’re stressed out about in real life. That would explain why dreams are predominantly negative. Dreams tend to be much more about anxiety than about pleasure and involve a lot of intense feelings and fear. The idea is that we wake up, and we’re more prepared to tackle the things we faced in our nightmares. That would also maybe explain why dreams tend to involve more primal settings. There are a lot of actions like running around and being chased, elaborate themes that don’t have much to do with our lives if we live in cities. We’re less likely to have dreams about reading and writing and activities that are more recent developments.

What tools are scientists using to study dreams? Do you have favorite studies?

There are a lot of indirect ways that scientists have found to study dreams, like studying the actions of sleepwalkers or putting recording devices in people’s rooms and catching the utterances that they make during sleep talking and analyzing the language of that.

Neuroimaging studies and studies of rats with electrodes have been important. Some of the first research on memory consolidation and dreams comes from rat studies. Matt Wilson, who’s at MIT, was trying to study memory in rats as they stepped into a maze. They went back to sleep and he noticed through the monitor that he had happened to leave on that their neurons were firing again, as if they were awake and running through the maze when they were in fact asleep. They’re replaying the path that they’ve taken through the day.

Building off that, other scientists ran an experiment where they released rats into a maze. The rats would run around randomly with no preference for any area. If the scientists gave them pleasurable stimulation while the rats were replaying a certain part of the maze during sleep, when the rat wakes up they tend to gravitate more toward that place.

Are there certain big questions that everyone in the field is trying to work on?

There’s definitely a lot of questions that are still unanswered. There’s no formula to determine why we have a certain dream on a certain night, why exactly we’re pulling different memories and mixing them up in the way that they appear.

There’s some really interesting new efforts to improve our ability to record dreams. One of the things that has held dream research back is that they’re so hard to study. Either you are asking people what they dreamed about, which obviously isn’t a perfect way to collect data, or you’re doing brain scans that you can only see, you can’t correlate perfectly to the actual dream content.

There was a Japanese study a few years ago where a group was actually able to create a very crude dream reading device. They scanned people’s brains while they were awake and thinking about certain objects and characters — like a man, a woman, computer, food — and then were able to look at those patterns and match them loosely to what they were thinking about when they were asleep. That correlated pretty well with the subject’s own dream reports.

There’s also a handful of researchers focusing on lucid dreaming. Scientists are looking at how we can induce lucid dreams more reliably, as well as clinical applications of lucid dreaming. I met one woman who used her lucid dreams to hypnotize herself and tell herself that she wouldn’t be anxious anymore. She said that had a positive effect on her waking state.

Another question is: if you rehearse for something in a lucid dream, how does that compare to practicing a task while you’re awake? There was one small study where students had a task tossing a coin in a cup and taking that and trying to have a lucid dream about that to see how effective that was.

That’s interesting, though I hate the idea that now I should be working in my dreams, too. What was the result of coin study?

Forty people tried to toss a coin into a cup about six feet away, and then, afterward, one group was allowed to practice in waking life, another tried to practice in a lucid dream and a control group did nothing. Practicing in real life helped the most, then the lucid dreaming group.

Dream research is typically considered a bit woo-woo. Do you feel like dream researcher is moving into the mainstream?

Dream researchers are definitely gaining more and more respectability, and it’s becoming a legitimate topic of study, as it deserves to be. But it’s still hard to get around the fact that dreams lend themselves to some theorizing that not all areas of study do. For example, I went to a conference in the Netherlands called the International Association for the Study of Dreams that has both people who are hard scientists and also people leading groups for dream analysis. It can be hard to disentangle the science from some of the more mystical ideas.