I think a lot of writers get their story ideas from dreams (or nightmares).
I tend to have a really good memory concerning my dreams, and I might not always remember everything as soon as I'm awake, but details of it would come back to me in dribs and drabs during the week. I've had one really strange sci-fi ish dream inspire a novel all on its own. The problem is that I don't write sci-fi, but it still inspired a novel in a different genre.
I take inspiration from my dreams because they're often very vivid. Unfortunately so are the nightmares, which is why my forté lies in horror rather than romance or sci-fi or any other genre. I've also written one of my more unpleasant dreams down on paper, which became the second chapter of my fanfic Image Becomes Reality
(http://www.fanfiction.net/s/5240350/2/I ... es_Reality
). At the time, I thought it was a really weird but good dream that I can't just lay to waste, because it wouldn't fit anywhere in any of my novels, so I morphed it into a fanfic for one of my favourite fandoms.
But I get my story ideas from everywhere and everything. I had one really complex plot idea of how to bring a very dead character back to life and have it all make sense and seem fathomable come to me while I was doing the ironing one day. Like Harry Potter, the plot just kind of 'walked in' to my head and it's been festering there since.
Sometimes it's people who inspire me - I'll see someone doing something, or overhear a conversation (which I do a lot when I pretend to be writing, a.k.a. procrastinate), or just someone with features that are a bit different. I've even had a story idea of a girl stalking a boy because she believed she'd seen him in her dreams, pop into my head while I was waiting for the bus one day.
What inspired that idea, though, was my insane impulsiveness to want to hop on a bus (that I had no idea where it was going) and try to steal a snapshot with my cell phone of a guy that I swear looked so much like a game character I adore that it was almost creepy. But then my conscience berated me that I'm not a crazy teenager anymore, and who cares if nobody believes me when I tell them I saw a guy that might as well have BEEN this fictional character, plus I'd be kind of obvious if I sit down right across from this poor guy with my two niggly little kids and take a photo of him.
Sometimes, my own work inspires another story idea. Other times it's little things that happen to me, or someone else, that inspires an idea. I guess I scratch my ideas out wherever I can find a hole. Kind of like journalists that have to go 'searching' for 'that' story.