It wasn't astral projection, it was a sleep paralysis.
Sleep paralysis consists of a period of inability to perform voluntary movements either at sleep onset (called hypnogogic or predormital form) or upon awakening (called hypnopompic or postdormtal form).
Sleep paralysis may also be referred to as isolated sleep paralysis, familial sleep paralysis, hynogogic or hypnopompic paralysis, predormital or postdormital paralysis
There is no known explanation why some people experience this paralysis. It is not harmful, although most people report feeling very afraid because they do not know what is happening, and within minutes they gradually or abruptly are able to move again; the episode is often terminated by a sound or a touch on the body.
In severe cases, where episodes take place at least once a week for 6 months, medication may be used.
You may be able to minimize the episodes by following good sleep hygiene:
1.getting enough sleep
3.exercise regularly (but not too close to bedtime)
4.keep a regular sleep schedule
Maybe it is creepy, but it is natural and there is nothing to be afraid of, it happened to alot of people, even to me.