I carry a small notepad or just record it on my Blackjack. Most of the time, I remember the idea later on, but I still write them down just in case.
I have a terrible memory so I lose ideas alot. Now I take paper with me and a pen when I go somewhere. Or I use what ever's available like a napkin. I also write on my hands. I get yelled at for that. L.O.L.
I usually have something to write it down on, but when inspiration strikes at inconvenient moments (in the middle of a high school graduation test, for instance), I repeat a phrase that will cause me to remember it over and over in my head until I've memorized it. That usually suffices until I get some paper.