I've had a somewhat similar experience, once. Sleep paralysis always happens at night, it's your brains way of making sure you don't haplessly flail around while sleeping. Occasionally, you may return to consciousness without the paralysis wearing off, and as has been mentioned, it can be accompanied by terrifying hallucinations, since you're essentially still sleeping. My case was much more benign though. I just woke up, found myself unable to move (tried to move my arm off my chest, totally impossible), and more frighteningly, unable to control my breathing. I then saw what appeared to be the door of my room opening slowly, as if someone peeped inside carefully, accompanied by a warm light. I thought that it was my mom checking up on me, so i tried to do my usual "i just woke up" grunt (approximately "ungh"), though the most i could produce was some kind of gargling, if anything (the gargling might have been a hallucination too). It was scary being paralyzed like that, but i soon after regained control of myself.
So basically, sleep paralysis is entirely harmless, it's just scary. I can't really offer any tips, but just try to stay calm, nothing's going to happen to you. I'm probably not able to put myself properly in your position though, because my case was only scary because i was paralyzed, which is pretty surprising when you consider what usually goes on in my head.