In some cases it could be brought on by the content of home life,movies,books and music that you let yourself consume. Most people with nightmare disorder or usually pessimistic or experiencing bad thoughts throughout the day which can be collected in the dream state to create what they witness in their dreams.