Astral Projection is the form of leaving your body to enters the mental and spiritual planes ( depending on which one you want access to). Being that you think you were sleeping, and where in the same room. It could mean one of two things
#1 Your were having a dream. Dreams, aren't just random things that dont make sense. Sometimes there's meaning behind them. Like the fact that if it was a dream, maybe you were going through a time where you needed to escape or needed higher knowledge
#2 You did leave your body and Astral Projection
The only problem with ^ those to. Is you haven't provided us with a lot of information. So it's mostly guessing. The more details the better..
I also agree with the other comment, how aware were you ?