When you're waking up from a nightmare, your first question might be, “Was that a bagel chasing me through my house with a sledgehammer?” And after the shock of dreaming about a homicidal, anthropomorphic breakfast dish wears off, your next question is probably, “Why was that bagel chasing me through my house with a sledgehammer?"
Nightmares, and dreams in general, occur during the rapid eye movement (REM) sleep stage. Depending on how long you sleep, your body goes through four to six cycles a night, and the REM stage gets longer with each sleep cycle. Most nightmares happen during the last third of your night’s sleep.
For most people, nightmares aren't a major problem: Only five percent of adults have a clinical nightmare problem where the dreams are too severe or frequent. But 85 percent of adults still experience normal nightmares—8 to 29 percent of people claim to have nightmares on a once-a-month basis, and two to six percent have nightmares once per week.
Experts say anything from everyday stress to trauma (nightmares are common in post-traumatic stress disorder) to just good-old-fashioned watching scary movies might trigger nightmares. But if you want to dodge a restless night pockmarked by bad dreams, you might want to rethink having that pre-bedtime candy bar.
For the rest of the story: http://mentalfloss.com/article/52228/what-causes-nightmares