The moment of inspiration can come from memory or language or the imagination or experience - anything that makes an impression forcibly enough for language to form.
The best time to frame an answer to the letters of a friend is the moment you receive them. Then the warmth of friendship and the intelligence received most forcibly cooperate.
The reason I started writing movies was because I kept getting parts that I just kind of stepped into. I didn't have to do a lot of work and I ended up getting sort of bored.