Are you awake when it happens? Could be sleep paralysis. If it is you could try to get into a lucid dream from there. There's plenty of WILD guides out there just search for wild.

Only other thing I can think of is night terror, I'm not sure what to do about that. http://en.wikipedia.org/wiki/Night_terror