Oh, to be a lucid dreamer!

To be fast asleep at 3:30 a.m. and then realize: I'm in a dream. I can walk up these stairs, jump off the porch and start flying. Why not? It's a dream.

Lucid dreams have lit up the big screen in movies, such as Pan's Labyrinth and Inception. But the ability to control dreams, the hallmark of lucid dreams, is quite rare in real life.

Now German neuroscientists have taken a step toward giving this elusive power to some run-of-the mill dreamers.

Small electrical pulses during sleep make some people feel as though they can manipulate their dreams, a team from Goethe University Frankfurt and the University of Goettingen reported Sunday.

The short shocks, which are barely perceptible, also make some sleepers more aware they're dreaming and feel more like they're watching their dreams as outsiders, the scientists wrote in the journal Nature Neuroscience.

"People normally take their dreams as reality [while they're sleeping]," says neurologist Michael Nitsche at Goethe University Frankfurt, who contributed to the study. "Lucid dreamers view their dreams like a movie: You know it's a dream, and you change it in certain instances. You put the dream in a dimension other than reality."

Nitsche and his team's technique is still far away from giving people Inception-like powers to climb walls, woo beautiful suitors or fight armies. But, he hopes, a similar method may one day help treat mental disorders, such as schizophrenia and post-traumatic stress disorder.

"Dreams can be really terrorizing for patients with PTSD," Nitsche tells Shots. "If it would be possible to induce lucid dreaming with these patients, maybe it would reduce their suffering."

Previous studies have found that lucid dreams occur during REM sleep — the time of the night when dreams are most memorable.

At this point, lucid dreamers show extra activity in the front part of the brain. Specifically, a distinct signal shows up on an EEG during lucid dreams — an electrical wave at 40 hertz (or 40 cycles a second) coming from the prefrontal cortex.

So Nitsche and his colleagues wondered what would happen if they enhanced this brain region's activity in regular dreamers.

They got 27 volunteers to come to the lab and sleep through the night. They stuck 60 electrodes on their skulls and waited until the subjects showed signs of REM sleep.

"Then we started electrical stimulation for 30 seconds," Nitsche says. "We woke them up and asked them what they were dreaming." The volunteers also filled out a survey that measures how lucid a dream is — how much people feel in control of their dreams and how much they realize they're dreaming.

Nitsche and his team repeated the experiment with eight different electrical shocks, from 2 hertz to 100 hertz.

Guess which one triggered the most control and awareness of dreams? Electrical waves that match those observed in spontaneous lucid dreamers: 40 hertz.

"There was a large, clear effect in some subjects." Nitsche says. "The most enhanced aspect was dissociation: People really became aware that they were dreaming. Control of the dreams was also enhanced but a bit lower."

"It's a really exciting study, and I think it's important," says Deirdre Leigh Barrett, a psychologist at Harvard Medical School and author of the book The Committee of Sleep.

Still, she's not convinced that the technique is actually inducing full-fledged lucid dreaming. "The stimulation is doing something in that direction, " Barrett tells Shots. "But a real lucid dream is rare and usually very dramatic. It's like a light bulb ... So if they [Nitsche and his colleagues] were going for clearly defined lucid dreams, they would have gotten a much lower response rate."

The researchers also didn't use the gold standard for measuring lucid dreaming, Barrett says. "In previous studies, subjects are asked to give a prearranged signal with their eyes when they're dreams become lucid," she says. "That's a much stricter criteria than the rating scales [used in the current study]."

Furthermore, this electrical stimulation technique isn't the first tool for enhancing lucid dreaming, Barrett points out. Back in the 1990s, psychologist Stephen LaBerge created a pair of goggles back to help trigger lucid dreams. And there have been psychological tools for decades that can increase the odds of having one of these dreams.

"The studies on these techniques used a much higher bar for what they're calling lucidity," Barrett says.

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