Curiously, Robert Louis Stevenson came up with the story of Doctor Jeckyll and Mr. Hyde whilst he was dreaming. Wikipedia has more on that here. Mary Shelley’s Frankenstein was also the brainchild of a dream.