Some writers hate having to answer this question, but it's a valid one. If we don't try to analyse the source of our stories, what happens if that source dries up? Not for a moment do I believe that any writers have just one source of inspiration, but sometimes it's easy to trace a story's genesis back to its root. I've pondered this ever since Stephen Donaldson came to Adelaide in the 1980s and told a crowded bookshop that he'd gotten the idea for the ending of the First Chronicles of Thomas Covenant from the sight of a spray can in a public toilet (or something like that--it was a long time ago). If something so trivial can inspire such a masterwork, why aren't we inspired to greatness every time we do the shopping?
I get a lot of ideas from dreams. This doesn't answer the question, really, but it does at least give me something I can point at. A moment in time, or an image, or a feeling, rather than a vague "wherever". Metal Fatigue, the Books of the Change and "A Map of the Mines of Barnath" would not exist but for the right dreams at the right times. (Or maybe they would have, but in different forms. Who can know? In this universe, that's how it happened.) I still remember the dreams; they haven't been written over by the later story-telling, and I find that interesting too. The memories are quite separate from the final account, unlike just about everything else in my head.
There are other stories whose geneses (that so doesn't look right) I can pinpoint with surety. Astropolis would not be a work in progress had I turned down Garth Nix's invitation to join him, Jonathan Strahan, and Charles Brown for dinner at the famous Flower Drum restaurant in Melbourne, 2002. Geodesica exists because I wanted to write a love story spanning a million years. Are they the same thing, these instances that led to bigger things? Not at all, but they were the seeds as I remember them.
The lifespans of some stories are so blurred I can't untangle them. The Crooked Letter is one such. There were two short stories I drew on for inspiration; I remember that much. (One of them, "Signs of Death", might see print this year, but "Soul Pollution" will stay forever unpublished, even though it contains the seeds of several important characters.) Years of thinking about religion from the perspective of an atheist helped me devise the complex "human life cycle" portrayed in the book (half-glimpsed and misunderstood as afterlife, reincarnation, etc). I've been mucking around with twins as long as I've been writing, and plan to keep doing so in future books. So it's very hard to say where it started, or even when it stopped, because in my head it remains an unfinished work, one I would love to go back over one day, from a new perspective and with a lot more experience under my belt.
In the end, does it really matter? Maybe that's the question writers should be most afraid of. Who cares where their ideas come from, really? As long as they're good ones.