I do best if I write it down. If I don't, I end up lying awake for hours going over it again and again, working out wrinkles until I'm convinced there's no way I'll forget it.
Then I wake up the next morning and the only thing I remember about it is that it was a great idea.