I have profitably mined my dreams over the years for fictional ideas.
A story never comes fully birthed from a dream. (At least it doesn't for me.) Usually what happens is that a dream provides an image that is a starting point for a story.
For example, The Maze came from a series of dreams I have had over the years about a vast world that consists of endless, interconnecting hallways. This has been a recurring dream for me.
The Nightmare (1781), by Henry Fuseli
The characters, however, and the central conflict of the story, came from elsewhere. All I got from the dream was the setting. But that was enough to get the book going.
My short horror tale, “Thanatos Postponed”, was derived from a very disturbing dream I had thirty years ago.
I was in college at the time, a student at the University of Cincinnati. One night I dreamt that I was walking across one of the university’s suspended glass hallways, when I was approached by a young woman whom I knew, somehow, to be no longer alive…but not quite dead, either.
I remember waking up that night, quite disturbed.
But if you’ve read “Thanatos Postponed”, you’ll know that the story is set in Mexico—not at the University of Cincinnati. And if you’ve read the story, you’ll immediately recognize the element of the dream.
I had the dream about the undead girl in 1987. I traveled to Mexico extensively for business in the mid-1990s.
I wrote “Thanatos Postponed” in 2017, thirty years after the dream, and about twenty years after my frequent travels to Mexico.
A dream, as I mentioned, is a starting point. But sometimes it takes a while for the dream element to find its place in a story.