The best thing to do for me is wiggle my toes, that snaps me out of it. Concentrate on a simple movement like biting down, wiggling toes or shruggin' your shoulders. I have to say, though, the other end of the spectrum is sleep walking and i would rather do this than that.