Washington State University psychologists found that almost one in five students they interviewed have experienced "exploding head syndrome," the often frightening illusion of hearing a massive bang inside your head as you are just falling asleep.
From WSU News:
Researchers suspect it stems from problems with the brain shutting down. When the brain goes to sleep, it's like a computer shutting down, with motor, auditory and visual neurons turning off in stages. But instead of shutting down properly, the auditory neurons are thought to fire all at once, (WSU professor Brian) Sharpless said.
"That's why you get these crazy-loud noises that you can't explain, and they're not actual noises in your environment," he said.
The same part of the brain, the brainstem's reticular formation, appears to be involved in isolated sleep paralysis as well, which could account for why some people experience both maladies, he said.