The usual claim about walking and thinking is that walking clears the head, which I think slightly mislocates what’s happening. A cleared head produces nothing; you need something to fill it with. What walking actually seems to do, on the days it works, is generate a slow, low-stakes rhythm that a half-formed sentence can attach itself to and get walked into a finished shape — the way a tune you can’t quite place will sometimes complete itself if you hum the first few notes enough times.
It doesn’t happen on every walk, and it specifically doesn’t happen on walks with a destination that has a deadline attached, which rules out most of the walking most people actually do in a day. It needs the middle stretch of a walk that has nowhere urgent to be — long enough that you’ve stopped composing the walk itself (which route, how much time left) and short of arriving anywhere.
I’ve started carrying an index card for exactly this reason, folded in a coat pocket, which feels like an overly formal solution to a problem that used to just solve itself by getting home in time to write the sentence down before it dissolved. It doesn’t always work. About half of what gets scrawled on the card is unreadable by the time I’m back at a desk, which is its own kind of information about how much of the sentence was ever really finished versus how much was just the feeling of a sentence.