Nightmares are incredibly unsettling, you would wake up in the middle of the night panting. Nightmares usually occur during the REM period of your sleep, that’s when your brain is as active as if you are awake even though you are still sleeping.
Scientists don’t know why we have dreams and nightmares, but there are a few things that might spur nightmares.