Sleep paralysis can come and go anytime, sometimes it can be as long as a year before you get it, than you can get a few times a week, or right one after another the same day. Your brain is awake but your body doesn’t respond. Are you still asleep or awake? Probably somewhere in the middle, although you can hear, but you can’t open your eyes. The only thing I know how to get out of it is trying to move a finger, or wiggle your leg, anything actually. After that you’re exhausted, it takes a lot of power to get out of it.
I’ve not figured out when it actually happens, falling asleep or waking up. It even happens when taking a nap during the day.