I’ve spoken to a number of writer friends on this subject; with varying responses.
Some do their best character building or plotting in the shower, others find a long drive spurs inspiration.
For me, inspiration strikes when and where it may; running, driving, the shower, in the middle of the night.
I was at a writers guild meeting a few days back, when someone said something triggering a story idea. It was an ‘aha’ moment, an intro for a story I’d been struggling with for a while, so I made a quick note in my folio, intending to follow-up later. By the time I drove home it was late. Tired, I went to bed.
At three in the morning my eyes popped open, the scene running through my head. Until five I laid in bed, working out the details, including all the dialogue; my mind not willing to quit until the scene was complete. A fell back to sleep for a few hours before rising, caffeinating, and typing it up.
When does inspiration strike you?