maybe your lucid dreaming...
when you have a lucid dream you can control it
if you are aware of what is happening in the dream
it's obvious you were sure to be aware of your surroundings, and i think you utilized your keen awareness in the dream state to control your dream