It appears that key elements in both Lewis’s and Tolkien’s fiction come from their own recurring dreams.
Lewis decided to make Aslan in the Chronicles of Narnia a lion after a spate of lion-themed nightmares. Charles’s William’s metaphysical novel The Place of The Lion may have also had something to do with it.
Here, we discover that Numenor/Atlantis became prominent the mythology of Middle-Earth in a similar way:
Tolkien’s legend of Numenor, the great island in the West that is given to the men who aided the Elves in the wars against Morgoth… It had one of its origins in the nightmare that had distrubed him since childhood, his “Atlantis-haunting” in which he “had the dreadful dream of the ineluctable Wave, either coming up out of a quite sea, or coming in towering over the green inlands”.
-Humphrey Carpenter, J.R.R. Tolkien: A Biography, p.173
Our creativity can be influenced by all sorts of things. It makes perfect sense for a dream to inform these things. What is interesting about a dream though is that it’s origin can be utterly subconscience and intuitive. They are in our head, but even after much pondering we cannot always make the connections as to where they came from. If you like to have things resolved, dreams like this will always stay curious. I think the very fact that we are unable to make the connection sometimes gives the imagery special significance.
Frodo’s forshadowing dreams figure heavily into The Lord of the Rings, though they seem to rarely be discussed. They don’t end up being important to the story. It’s almost as if Tolkien had some sort of explanation in mind for them but never got around to telling us what it was.