The second part of what Puffin said was pretty much exactly what I said haha, but perhaps better stated.
I agree with Mathias that you were most likely still in sleep paralysis when you woke up, and that fact that you felt it when you were dreaming was probably that sleep paralysis leaking into your dreams, which has happened to me a few times.