Kevin and Desvelar,
Kev, you may be thinking of Bram Stoker's Dracula. It is often said that he wrote it after he overate one night and then had a terrible nightmare, but that seems to be just a legend.
Mary Shelley was the author of Frankenstein. She had run off and eloped with the poet Percy Shelley at the and of 19, and in 1816 they were visiting Byron, a friend of Percy's in Geneva. Gothic fiction was all the rage, and they decided one evening that they would each write a horror/ghost story. Mary's was about a medical student, Victor Frankenstein, who creates a monster from human parts and then has to cope with it when the monster is rejected by human society and comes looking for him. I think it is said that Mary's story is based on a dream she had.
Have you read either of these books? They are both fantastic and raise all kinds of moral and ethical issues - not at all like the famous but bland Hollywood versions! If you are into this kind of literature the original Dracula is just about the creepiest book you will ever read.
Really great literature is all about unbridled imagination, and that's what we get when we dream - our mind has nothing else to do so it just takes off in whatever direction it wants. Many poets and novelists develop in their writing ideas they got from dreams.
Nobody living can ever stop me
As I go walking my freedom highway.
Nobody living can make me turn back:
This land was made for you and me. (Woody Guthrie)