I was even recently asked that question by someone in the industry regarding my space opera series.
I'm sure I looked like she had just asked me where air comes from. "Um, everywhere?" I gave her some answer, but I really wondered why she was asking that since she works with writers. The only thing I came up with (for her reasoning) was that perhaps she was looking for someone to say, "OH- it was a fanfic of a show/movie/other book and will be a great hit now! *cough-50 Shades-cough* So maybe it was a screening device.
I'm afraid with me it just made me fumble.
Maybe I should have said my ideas come from the magic idea faeries just like all writers. We put pens under our pillows at night and in the morning the pens are gone, but ideas are flowing!
I can't answer for other writers, but I get my ideas everywhere- and I do mean everywhere.
This tree here for instance:
Nice, craggly tree- it, or rather the squirrels that live in it, lead to some amazing little side villains in The Glass Gargoyle. I had been writing the rough draft under this tree when a squirrel took exception and started harassing me. A lot. Chattering at me, tossing down twigs, he had serious territory issues (once he figured I didn't have food anyway).
Which lead to an ongoing war between my drunken faeries and some possessed squirrels (who might just be back in book three, but don't tell anyone ;)).
I've gotten ideas from songs- I have a song on a playlist that is already a full blown "last stand" battle scene in my head for the space opera. I get ideas from people I meet, things I see, places I go.
Ideas are EVERYWHERE. So, maybe next time someone asks where ideas come from, I'll point to the world around us. Or maybe just hand them a pen and tell them to put it under their pillow at night ;).