I still wonder just what it was Mary Shelley ate/drank before she had the dream that ended up becoming the novel Frankenstein. So sometimes then the stuff of nightmares can lead to classic literature...
What kind of nightmares does your characters have? Why? How do they combat them? Is there any chance of them coming true? Do other characters trigger nightmares in others, deliberately or otherwise? And in a magical world, what effect does magic have on the mind? Can the abuse of magic cause damage mentally or otherwise, leading to nightmares?