Thanks to Sigmund Freud, we all know what it means to dream about swords, sticks and umbrellas. Or maybe we don't.

"For 100 years, we got stuck into that Freudian perspective on dreams, which turned out to be not scientifically very accurate," says Robert Stickgold, a sleep researcher and associate professor of psychiatry at Harvard Medical School. "So it's only been in the last 15 to 20 years that we've really started making progress."

Today, most brain scientists reject Freud's idea that dreams are highly symbolic representations of unconscious (and usually sexual) desire. That dream umbrella, they say, is probably just an umbrella.

But researchers are still trying to figure out what dreams do represent, and what their purpose is.

"There's not really a solid theory about why dreaming is there," says Benjamin Baird, a postdoctoral fellow at the Center for Sleep and Consciousness at the University of Wisconsin ­– Madison. "It's a big mystery."

But it's not surprising that we do dream, Baird says. One of the main functions of our brain is to constantly create a model of the world around us, a sort of virtual reality that helps us interact with our environment.

When we're awake, that model is heavily influenced by what we are seeing and hearing and feeling. But during sleep, when there's not much input from our senses, the brain's model of the world is more likely to rely on internal information, like memories or expectations.

"So something like dreaming is to be expected," Baird says.

And by studying people as they sleep, scientists have learned a lot about dreams.

Dreaming All Night Long

One observation from sleep labs is that we dream a lot, even though we rarely remember these dreams.

Medical textbooks often say that people average about five dreams each night. But sleep researchers say that's probably a low estimate.

"I am not convinced that there is ever a time when we're asleep that we don't have some form of consciousness going on," Stickgold says.

Some of the evidence for this comes from sleep studies showing many periods during the night when signals from the brain suggest a person is thinking. More evidence comes from sleep studies in which people are repeatedly awakened, which greatly increases the chance they will remember a dream or thought.

When a person is woken up, they report some sort of mental activity about 80 percent of the time, Stickgold says. He says many of these "mentation reports" are more fragmented and less likely to contain narrative elements than what most people consider a dream.

And scientists have revised an old assumption that dreams occur only during rapid eye movement (REM) sleep. There's growing evidence that dreams also can occur during non-REM sleep, though these dreams tend to be less vivid.

A Hot Zone For Dreams

Sleep studies also have led researchers to an area of the brain they suspect is responsible for generating dreams.

This region at the back of the brain becomes very active when people are dreaming, a team reported earlier this year in Nature Neuroscience. The team studied the electrical patterns in the brains of 32 people as they slept, and woke them up repeatedly to ask about dreams.

The researchers also found that brain activity could reveal some details of a dream, like whether it included a face or movement. These experiences activated the same brain circuits that become active when an awake person sees a face or experiences movement.

The finding supports other research finding that "we are using our brains the same when we're dreaming [as] when we're awake," Stickgold says.

Dreams and Memory

Many researchers believe dreams have a close relationship to the way our brains process memories.

"When we sleep, the brain does a lot of work, taking what we've learned, what we've encoded as new memories in the last day, and trying to figure out what they mean," Stickgold says.

So dreaming may be a way for the brain to "take new information, combine it with old information in these totally strange ways, and see if it can get any insights into the usefulness of that information," he says.

This sort of thinking grew out of studies showing that REM sleep can help people remember something they've learned. There is also evidence that during REM sleep, the brain relives certain recent experiences, burning them into long-term memory – a process known as memory consolidation.

But scientists are still debating whether dreaming is an essential part of this sort of memory processing, or just a novel byproduct of the brain's nighttime activity.

Dreams And The Developing Brain

Even before birth, a baby's brain begins experiencing intense periods of REM sleep, the sleep state usually associated with dreaming.

"REM sleep is clearly playing a developmental role because it is occurring in huge proportions just before and after birth," Baird says. One hypothesis is that by dreaming in utero, the fetal brain is experiencing a sort of protoconsciousness that will help it become fully conscious later on.

But there's no way of knowing whether a fetal brain is actually dreaming, or what it would dream about. And children don't begin having dreams with story lines until about age 5, when their waking brains have learned to tell stories.

Dreams We All Dream

A number of Freud's observations about dreams are still relevant, even if his interpretations of them are less than scientific.

For example, he observed that certain dream elements are common, if not universal. Teeth, for example.

"A particularly remarkable dream symbol is that of having one's teeth fall out, or having them pulled," Freud wrote in A General Introduction to Psychoanalysis. He goes on to say that's usually a symbol for castration "as a punishment for onanism." The castration explanation may be off base, Baird says. But problems with teeth are, indeed, something many people report in their dreams. "It's weird," he says. "What has that got to do with anything?" Baird suspects we share many dreams like this because we share the same nervous system design, and many of the same anxieties.

Lucid Dreaming And Consciousness

Dreams may be so hard to pin down scientifically because they are so closely related to consciousness, a concept that has bedeviled scientists and philosophers for centuries.

We all somehow know we are conscious. But it's been difficult to define precisely what consciousness is, let alone determine how it is generated by the brain.

And dreams are "a nasty little side part of the problem of consciousness," Stickgold says. When you are dreaming, "you are in an altered state of consciousness," Stickgold says. "It's just not the same exact kind of consciousness as we have when we're awake."

In some dreams, "consciousness" may be as simple as feeling an emotion or seeing a face. In others, though, it can involve complex narratives, detailed images and seemingly real experiences.

"It's astounding, really, that completely on its own the brain is taking some random activation and structuring it into these fantastic narratives," Baird says.

Both Baird and Stickgold think dreams may offer a way to study consciousness. One reason is that when someone begins dreaming, it's possible to watch their brain enter a certain state of consciousness. That is allowing scientists to look at the brain circuits that are involved in producing this state.

And Baird is particularly interested in dreams known as lucid dreams. They are unusual because the dreamer is actually conscious that they are dreaming, Baird says.

He and other researchers say lucid dreaming may be a state in which the brain is simultaneously awake and dreaming. So it may be possible to have dreamers themselves ask what their dreams mean.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.