Sounds like sleep paralysis.
Here's a quick, easy-ish to read write up on the phenomenon:
http://national-paranormal-society.o...is-paranormal/
Basically your brain is still dreaming when your body wakes up. Because the brain releases a chemical so you don't move in your sleep, you feel trapped. Because your brain is still dreaming, you see crazy things.
I don't disagree with you that this sounds like a terrifying experience.