My nightmares, and my dreams have been an inspiration for many of my stories. I'm sure many other authors out there would say the same.
Some of my nightmares have woken me up in the middle of the night, drenched in sweat and gasping for breath, and it takes quite a while to fall back asleep. I usually take that time to review what I saw in my mind, and make mental notes for what it might mean when I reflect upon it during daylight consciousness. Keeping a notebook on my bedside table has been essential, as sometimes I simply cannot remember what I saw the next morning.
Sometimes, even that is not enough; one morning I woke up and saw the words "evil crocodile eye" scrawled on the page. I couldn't remember the dream, but I started thinking about a story where the crocodiles started attacking people all over the world in a plan to become the dominant species. Another morning I woke up and a word that looked like "terenmeff" was there in my notebook. Did some research, found nothing on it; apparently it was a word I made up so I used it for the name of a vampire character in my novel "Deluded Blood."
One never knows what can be found inside one's own mind......