Have you ever been drifting off to sleep when suddenly you hear what sounds like a gunshot, a door slamming, or an explosion inside your head? You jolt awake, heart pounding, sit upright in bed, but the room is silent.Nothing has happened – but it felt very real. This experience has a dramatic name: exploding head syndrome. Despite the alarming name, it’s not dangerous, not painful, and not a sign something is wrong with the brain.What is it?Exploding head syndrome is a type of sleep disorder known as a parasomnia.Parasomnias are unusual experiences that occur while sleeping or during transitions between sleep and wakefulness.In exploding head syndrome, a person “hears” a sudden noise that seem to originate from deep inside the head. It’s a sensory perception generated by the brain rather than an external sound.It typically occurs when drifting in or out of sleep, most commonly when a person is drowsy and about to fall asleep.People commonly describe a sudden bang or loud metallic noise, gunshots, an explosion, crashing waves, buzzing electricity, a door slamming, or fireworks.Exploding head syndrome can be intensely frightening. The loud noise may be accompanied by other sensations, including a brief stab of pain in the head (though it’s normally painless), flashes of light, out-of-body sensations, or the sensation of electricity coursing through the body.The episode only lasts for a split second or a few seconds, and typically disappears completely once the person wakes up. Some people experience only a single episode, while others may have occasional episodes or brief clusters before the condition settles.Because the experience is so sudden and unusual, many fear they’ve had a stroke or seizure, or that something catastrophic has happened. Others interpret it as a supernatural or ominous event.The distress is caused not by pain, but by confusion and the body’s alarm response. The brain is partially awake, disoriented, and briefly activates the fight-or-flight system.What causes it?We don’t know the exact cause, but researchers have proposed several theories.Because episodes occur during the transition into and out of sleep, they may be related to the same processes that produce what are known as hypnagogic hallucinations (vivid sensory experiences you can get while falling asleep). As we fall asleep, different parts of the brain gradually switch off in a coordinated sequence. In exploding head syndrome, that process may be linked to the shutting down of neural systems that inhibit auditory sensory processing. Your brain may end up interpreting this as a loud sound.A related theory proposes a brief reduction in activity of the brainstem, particularly the reticular activating system (which is involved in regulating transitions between wakefulness and sleep).Exploding head syndrome typically does not involve pain, and is therefore different from headaches and migraines.The syndrome’s distinct features also makes epilepsy an unlikely explanation for most people. How common is it?Exploding head syndrome is more common than you may think.It occurs in at least 10% of the population, and around 30% of people will experience it at least once in their lifetime.It can occur at any age, often after the age of 50. It may be slightly more common in women, but we don’t know why.Exploding head syndrome is more likely in people who have other sleep disturbances, such as insomnia or sleep paralysis.It is also associated with:being more stressed or emotionally tense than usualanxietydisrupted sleep patterns or poor sleep associated with daytime tiredness.How is it treated?Exploding head syndrome is harmless and not a sign of a serious brain problem. Episodes are usually brief, and may occur sporadically or in brief clusters before resolving on their own.Once people are reassured the condition is not harmful and not a sign of brain damage or serious disease, episodes may become less frightening and frequent.Medications are considered if episodes are frequent and very distressing but there haven’t been any large clinical trials that can guide treatment. Some sufferers have benefited from medications such as such as clomipramine but the evidence is limited, and more research is needed.More commonly, treatment consists of reassurance and improving sleep habits. Some people report that addressing sleep problems such as insomnia, reducing tiredness and practising mindfulness and breathing techniques can help.Generally harmlessIn 1619 French philosopher René Descartes described having three dreams he regarded as a sign of divine revelation. In one, he heard a loud sound and saw a bright flash of light when he woke up. Some researchers have suggested what he was really experiencing was exploding head syndrome.Despite its dramatic name, exploding head syndrome is harmless. For many people, the most effective intervention is understanding what it is – and knowing that it is not dangerous. Although it is generally harmless, you should seek medical advice if episodes occur frequently, impact on your quality of life or are causing distress. Consult a doctor if they are painful, or associated with seizures, prolonged confusion, loss of consciousness or severe headache.Flavie Waters does not work for, consult, own shares in or receive funding from any company or organisation that would benefit from this article, and has disclosed no relevant affiliations beyond their academic appointment.