True lucid dreaming is rare and has intrigued philosophers for centuries. Experts have also thought that if people could harness it, it could be a powerful tool for therapy.

“Sometimes the dreamer gains control over the ongoing dream plot and, for example, is able to put a dream aggressor to flight,” Ursula Voss of J.W. Goethe-University Frankfurt, Germany and colleagues wrote in their report.

Voss’s team knew that brain waves change during lucid dreaming. They’re often accompanied by waves in what’s called the lower gamma frequency band — around 40 Hz. But it’s not clear which comes first — the dream, or the brain wave activity.

So they got 27 young adults to volunteer for a dream study, pulsing their heads with various frequencies, from 2 Hz to 100 Hz, using a technology called frontotemporal transcranial alternating current, or tACS. Electrodes are put on the scalp to deliver the current. They also did a sham treatment.

They woke up the volunteers at various phases of sleep and asked about dreams.

Here’s what one looked like: “I was dreaming about lemon cake. It looked translucent, but then again, it didn’t. It was a bit like in an animated movie, like the ‘Simpsons,’ ” the dreamer reported. “Then I realized ‘Oops, you are dreaming.’ I mean, while I was dreaming! So strange!”

Treatment with this kind of stimulation might be useful for some types of schizophrenia, the researchers said, or obsessive-compulsive disorder. “Finally, promoting gamma oscillations during REM (rapid eye movement) sleep in post-traumatic stress disorder with reemerging nightmares might trigger lucid dreaming and eventually enable active changes in dream content,” they said.