Anxiety and stress are major causes of nightmares. Trauma or upsetting events such as death of a loved one can bring on nightmares. Other causes include a fluctuating sleep schedule, sleep deprivation, jet lag, illness and fever. Side effects of a medication or drug.