The most important thing to remember when dealing with sleep paralysis is that it is temporary, and there are ways to break out of it.
First and foremost, try not to panic. 
It may feel like you are stuck in a never-ending nightmare, but if you can remain calm and focused on your breathing, the episode will soon pass. 
Other techniques that may help include focusing on physical movement, visualising yourself “breaking out” of the paralysis, or calling out for help if you’re able to speak.