Walking... is something that works for me when I'm figuring out melodies and arrangements. Being in the shower, as well. Brushing my teeth. Vacuuming the carpets.
They take up a bare minimum of mental bandwidth and allow some part of my conscious/subconscious to do its (their?) thing.
Say, though, that I hit on something tasty. Something I want to arrange, perform, record, orchestrate, and mix. Say I hit on something good.
If I'm on the clock to compose, I head back home with a melody on relentless mental loop until I'm back in Noteflight.
If I'm out 'n about living my life doing other things... then I hum whatever I've got into a voice recorder app on my phone complete with further instructions to my future self.
And if I'm feeling lazy, if I'm on the couch, on the bed, maybe I'm in a park with a little time and my notebook... then I sketch it out on paper.
I don't notate, though. I'm not writing into a score. I'm writing lettered notes onto paper over numbers. For example, 1 2 3 4 or 1 - 2 - 3 - 4 - depending if I'm mostly quarter notes or eighth notes. And if I'm thinking in sixteenths... then it's 1 e - a 2 e - a 3 e - a 4 e - a.
I write lettered notes over the count, sometimes with a (#) next to it or a (b) to indicate a note's sharp or flat. It's actually a pretty quick process of capturing what's in my head and, most importantly, I can "read" this language and hear what was in my head when I wrote it down. Which is pretty cool.
It also helps, by the way, to engage the music more deeply this way. To spend more time considering each note. Which increases the likelihood my brain'll play around with this music, this idea, on its own at some point. Hopefully in the near future.