I think its something about the chemical your body releases when your asleep to stop you acting out your dreams. A bit like the opposite of sleep walking, perhaps sleep walking is a lack of this chemical and sleep paralysis is too much of this chemical. That all seems reasonable and scientific to me, the part I cant make sense of is the demonic experiences people report while being paralysed. Every time it happened to me, there was a groaning noise in my ears and the feeling of a presence in the room.
The demonic story came from the time when a lot of people believed in that stuff, it was thought that a demond is on your back thats why you can't move.
As I said sometimes people hallucinate (see demons and other stuff) as reality can be mixed up with the dream from which you've just awoken.

