Nightmares: being chased by killers, falling from great heights, maybe even public speaking in your underwear. But what if you could control those dreams?

New research soon to be published in the journal Nature Neuroscience shows scientists can give study participants lucid dreams, the kind where the dreamer is in charge, by giving their brains a light electric shock.

The key characteristic of lucid dreams is that the dreamers know they're dreaming. Got it?

Being aware typically makes the dream very vivid and, supposedly, allows you to decide what to dream to a certain extent. Some people claim to be able to experience any adventure they want in their dreams. (Via Al Jazeera)

And it's no surprise, the Internet is full of lucid dream how-to guides, some for a spiritual purpose and some because it's just plain cool. (Via YouTube / Lucid Dreaming Made EasyVideojugInfinite Waters)

>> Read more trending stories

But the study may show there's a shortcut. Researchers stuck electrodes on the skulls of 27 non-lucid dreamers and zapped them with varying frequencies of electricity while they slept. In theory, this helped recreate the same kind of brain wave activity as a lucid dreamer.

Mostly that means gamma waves, a type of brain wave which, according to LiveScience, is linked to consciousness. Your brain doesn't generate them during normal dreaming, but it does during lucid dreams.

And, sure enough, the researchers saw a spike in gamma wave activity, especially if the participant reported having a lucid dream. Though it's kind of a chicken-or-the-egg problem, in that they don't know which came first.

"Does lucid dreaming trigger gamma-band activity or does gamma-band activity trigger lucid dreaming? ... Perhaps the capacity to generate gamma-oscillatory activity sets the stage for lucid dream." (Via NBC)

Regardless what causes what, there could be some mental health benefits from the research.

The Guardian quotes one of the study's authors, saying, "As a model for mental illness, understanding lucid dreaming is absolutely crucial. ... [It's] certainly a step in the direction of understanding how the brain manages to hallucinate and be deluded."

The study could also help scientists better understand consciousness — and, who knows, maybe pave the way for our very own lucid dreaming devices.