I get a lot of my inspiration from dreams. I get it from random musing and what-if scenarios that come to mind. I get it from talking to friends, family, total strangers, and from pretty much anything else one can think of. A lot of the inspiration doesn't amount to much. Some of it turns into interesting story prospects. And some of it turns into absolute gems. From those gems, I've written some of the best stories of my life. So far.
Most of those stories wouldn't exist, in any form, if I hadn't written down the ideas when they came to me. Starting when I was still in high school, and for many years afterward, I slept with a notebook beside my bed. I'd wake up from a dream - or sometimes a chilling nightmare - with inspiration, and write it down in the notebook. Now in the virtual age, I do the same thing with a computer. I still have the notebook, though. It's around somewhere, and it's pretty interesting to leaf through it from time to time and chuckle over some of the random ideas and thoughts written inside.
I keep a word document for my story ideas now. I update it from time to time with those ideas and flashes of inspiration. In fact, a couple of years ago, I couldn't power my computer up fast enough to get the images of an incredible dream down in some semblance of coherence. I normally leave the computer on, so it's easier to access quickly, but this time I was away in a war zone and it wasn't possible. When I'd finished writing my thoughts, I'd written about 500 words, and I powered my computer down, got up and ready, and went out to save the world. Those 500 words have since turned into a really great novel that I'm currently querying to agents. If I hadn't have written them down, they would have faded away and that really great novel would have been nothing more than an obscure and blurry memory of a really wild dream, where the details dance annoyingly out of reach and disappear.
I know some folks don't do this. They'll tell you if a story is really that good, and really destined for greatness, they'll remember it. If it fades from memory, it was never meant to be. I don't know why someone would do that. Certainly an author would want to use every resource at his disposal to turn great ideas into great stories. I would. I can't imagine losing the story that was based on that wild nightmare. And I can't imagine anyone else would either. Of course, that's just my two cents. It's still a great habit to form.