You might want to look into "Lucid Dreaming" Lucid dream - Wikipedia, the free encyclopedia
I used to be able to do this on a regular basis, and your awake state stays with you a bit longer than a 'normal' dream. Just heed the recorder/notepad idea. this might give you an extra minute of rememberence.
Alas, there are actual techniques to try and train yourself to lucid dream, if you've never experienced one, it's quite sweet. Control comes with practice... i've not tried the training techniques, but lucid dreaming is a very real thing.
Add "Techniques" to your search for suggestions.