The best answer ever given to that question, to my knowledge at least, comes from Theodore Geisel.
When asked by an interviewer where he got his ideas, he said the following:
“I get all my ideas in Switzerland near the Forka Pass. There is a little town called Gletch, and two thousand feet up above Gletch there is a smaller hamlet called Über Gletch. I go there on the fourth of August every summer to get my cuckoo clock fixed. While the cuckoo is in the hospital, I wander around and talk to the people in the streets. They are very strange people, and I get my ideas from them.”
Where do you get your ideas from?