Sometimes I hum the theme into my iPhone to transcribe it later. At work, I have some sheet music paper and I often scribble out themes or harmonies that pop up from time to time, then if I haven't lost them by the end of the day, bring them home and transcribe them as well.