Sleep is a complex phenomena, despite a rest state, a lot is happening in brain and body during sleep. The phenomenon you have described could be likely sleep paralysis of REM sleep, having said that it requires detailed evaluation to rule out other differentials based on various parameters like time of occurrence, duration, associated symptoms, weight, BMI, overall sleep quality, family history etc.
Next Steps
Consult a psychiatrist.
Health Tips
EEG could be advised if need be by psychiatrist.