BBB Etymology - Nightmare
The second syllable is an old word for a spectre or hag. A nightmare used to be an evil spirit, in the Middle Ages thought to be a female monster, which was supposed to settle on people during their sleep and produce a suffocating effect. Only in the 16th century did the modern meaning emerge.