It's the single most-asked question of fiction writers. I used to reply with Harlan Ellison's snappy comeback, "From a post-office box in Schenectady."
But it doesn't answer the question, of course, because if we writers had any idea where our inspiration came from, the technique would have been patented long ago.
Over the years, I've paid attention to where my best ideas strike me: in the shower, walking the dog, drifting off to sleep. In fact, I was mowing the lawn last Saturday when I experienced a sudden insight about the novel I'm working on, and a marvelous idea for a critical scene came to me full-blown. (I started mowing the lawn as a teenager and kept up the practice when I discovered how much problem-solving I got done while pushing those deadly blades over my little green patch of suburbia.)
What do all of these places have in common? I'm in a meditative state. My mind is free and somewhere else, not on the book. I'm not thinking.
I formally meditate, though I've been irregular about it lately. I can't recommend it highly enough; I gain insight and reduce my stress level significantly. The core of the practice is freeing your mind from the problems that plague you -- i.e., the chatter, the noise of thinking.
Here's a post on Zen Habits (a great lifehacking blog with tons of how-tos for organizing your life) about non-sectarian meditation.
Give it a shot and see if you don't become inspired. Me, I'm going out again this morning to mow the lawn (for real).