Many different techniques can be used to "wake you up" and give you more tries at staying conscious when you are in the borderline state between awake and asleep (a.k.a. trance). You can set alarms at regular intervals, or use the technique of recording progressively louder sounds on a tape, like Robert suggests in Astral Dynamics