Inspiration can hit you in the head at any time in any context. It could happen in a conversation. Talking to someone at a party, you can get an idea. But you’ve got to remember those inspirations.
I had read tons of science fiction. I was fascinated by other worlds, other environments. For me, it was fantasy, but it was not fantasy in the sense of pure escapism.