If you find yourself in a nightmare, and you want to exit the dream, just close your eyes and fall back.
Or if you want to stay, close your eyes and think of something beautiful, and say "When I open my eyes i will be in some beautiful place"
I'm glad if I helped