Where do your ideas come from?
That's pretty much where mine come from too, except I tend to think of it as a sort of cosmic soup pot that I stuff full of trivia, tidbits, things that make go 'I wonder,' things that make me go 'Hmm. That's funny,' things that seem neat or cool or coincidental or sharp....
And then I let it cook, and every so often I stick a spoon down in there and see what's stuck together. And sometimes it tastes good. And sometimes it needs more cooking, and maybe some ginger or salt or garlic or a factoid about the Austro-Hungarian empire.