Fortunately, exploding head syndrome is not as dangerous as it sounds.

But it is a real condition, and researchers are finally beginning to seriously investigate the rare and little-understood sleep disorder.

People with exploding head syndrome hear extremely loud noises — a gunshot, an explosion, a thunderclap — as they're drifting off to sleep, or as they wake up from a deep sleep. [5 Things You Must Know About Sleep]

"The sound is terrifying — super loud, like someone has broken in," Marie Raymond of Seattle told NBC News. "But when I get up to look around, nothing's amiss and everything's quiet."

Symptoms of exploding head syndrome

The symptoms of exploding head syndrome vary from person to person, but there's usually little or no physical pain associated with the condition, according to the American Sleep Association (ASA). Some people describe bright flashes of light accompanying the loud sounds. Anxiety, an increased heart rate and shortness of breath are also common after the loud noise.

"It's a provocative and understudied phenomenon," Brian Sharpless, a professor of psychology at Washington State University, said in a statement. "I've worked with some individuals who have it seven times a night, so it can lead to bad clinical consequences as well."

For obvious reasons, exploding head syndrome can interfere with sleep. "Some people start to become anxious when they go into their bedroom or when they try to go to sleep," Sharpless said. "Daytime sleepiness can be another problem."

Stress and exploding head syndrome

A few sufferers hear the noise in only one ear, while others hear it in both ears. In other cases, the sound seems to come from inside the patient's own head (thus the condition's name).

Most researchers find that exploding head syndrome often occurs in people who are dealing with high levels of stress and physical or mental fatigue. It affects both men and women, though the condition appears more commonly in women, and among people 50 years and older (though it's also been reported in children).

Because there's been little research into the condition, nobody is certain what causes exploding head syndrome. Some experts have speculated that it's related to minor seizures in the brain's temporal lobe; others suggest it might be related to hearing disorders.

Doin' the hypnagogic jerk

Exploding head syndrome is one of several conditions described as hypnagogic, or occurring in the transitional state between sleep and full wakefulness.

The "hypnagogic jerk" is an involuntary muscle spasm or twitch that occurs as a person is drifting off to sleep.

The muscle spasms may occur spontaneously or may be induced by sound, light or other external stimuli. Some people report hypnagogic jerks accompanied by hallucinations, dreams, the sensation of falling, or bright lights and loud noises coming from inside the head.

As with exploding head syndrome, researchers aren't sure why hypnogogic jerks occur, but a few theories exist. One hypothesis says that these events are a natural part of the body's transition from alertness to sleep, and occur when nerves "misfire" during the process.

Another popular idea takes a more evolutionary approach to hypnogogic jerks, explaining that the spasms are an ancient primate reflex responding to the relaxation of muscles at the onset of sleep — the brain misinterprets the relaxation as a sign that the sleeping primate is falling out of a tree, and causes the muscles to quickly react.

Is there a cure for exploding head syndrome?

When exploding head syndrome is related to stress or fatigue, experts recommend stress-management techniques such as yoga, meditation or simply a hot bath before sleeping.

Doctors have reported that many sleep disturbances like exploding head syndrome are related to the use of certain medications or drugs, according to the ASA. Moderating the use of these drugs may alleviate the symptoms of exploding head syndrome.

Some evidence suggests that clomipramine, a member of an older class of tricyclic antidepressants, can help treat exploding head syndrome.

For many patients, the condition comes and goes, disappearing for long stretches at a time, then eventually going away entirely on its own.

Follow Marc Lallanilla on Twitter and Google+. Follow us @livescience, Facebook & Google+. Original article on Live Science.