When I'm in this boat, which is a more regular thing now, I use the alphabet method. I clear my mind and start thinking of one letter of the alphabet at a time. In many cases, when I get to the right letter, whatever I was thinking of pops back in. I still need to carry a pen and paper so I don't forget again.
Hey, that's a good one! I'll try it the next time this happens. (probably soon)