What time does school start, and what time do you normally wake up?
For me it is kind of like that too: out of habit, when I am kind of asleep, my body just does it and I fall, out of a strong habit I guess. However, that hasn't happened in a while (aside from keri-dreams)--basically, have faith that if you start doing it less, it will stop.
The shulchan aruch, in its first siman, writes that a person should be strong like a lion when they wake up in order to be "m'orreir hashachar", i.e. to wake up before dawn. Now practically, if dawn is like 4:45AM or so, the Rama writes that l'pachos, at the very least, one should wake up on time to daven with a minyan.
I would recommend 3 things:
-Set a firm time that you will get out of bed;
-Go to bed at a reasonable time (9-10 o'clock, don't stay up really late)
-Daven shacharis
For me, I was lucky that there was a shul across the street from my public school, but sometimes I would stay with my dad and couldn't make it, so I knew that to get to school at 7:30, I would have to wake up at 6:00 to shower, daven, and eat breakfast.
Also, try getting up by 8:00 on Sundays. Early to bed, early to rise, makes a man happy, healthy, and wise