First, you have to be aware enough in the dream to realize that the dream is ending that way, you will remember not to open your eyes or move.

You can also train yourself to recognize the back of your eye lids by staring into them while awake for a couple of minutes. That way even if your not aware enough to realize your dream is ending, when you wakeup and see the backmof your eye lids you will realize, "ok I just woke up don't open your eyes or move."