Sunds like the typical sleep paralysis .. See if it happens again .. If it does happen again regularly, go consult a doctor .. If not, don't worry, it was just that and you are perfectly safe ..
And please don't think it's some demonic possessions and what not, because it's not!
Good luck











