It sounds a lot like it to me as well. For me, I had this feeling of knowing I was dreaming, knowing that I wanted to wake up and get out of this dream, but physically not being able to. This fear and panic setting in the longer it went on. I do think avoiding lying on your back will help, don't know why. And maybe keeping a more regular sleep schedule. My sleeping habits were bad so that's probably why. It really scary, isn't it? I hope I never have to go through that again.
They say, if it happens to you, focus on something particular. Like wiggling your finger. It might snap you out of it.