Penn Medicine News discusses sleep paralysis.

Sleep paralysis is responsible for how we talk about bad dreams. That shallow breathing I mentioned is one of the most common features of each episode of sleep paralysis. There are written accounts from ancient cultures of sleepers reporting the feeling that someone was lying on their chest, as if they were being choked. Eventually, people came up with an Olde English word to describe it – maere, which refers to a female evil spirit that lies on top of sleepers and suffocates them. Given that it always came at a certain time of day, they combined it into a new word: Nightmare.