Some ways to prevent nightmares include maintaining a fixed sleep schedule to ensure enough sleep is being obtained, eliminating caffeine and alcohol and regularly exercising. Medical problems might also be responsible, in which case it is wise to consult a professional.
Anxiety, heart complications, dental complaints and fever are some of the underlying medical conditions that have been linked to nightmares. Emotional problems may be responsible, such as family conflicts or significant changes in a person's life situation.
Exercise is an effective means of alleviating stress and anxiety, but it should be avoided before sleep.
Eating before going to sleep is another common cause of nightmares. While alcohol, caffeine and smoking are best avoided altogether, they should especially be avoided before going to bed.
Prior to sleeping, the priority should be to relax, which means avoiding frightening or over-stimulating movies, television shows and video games. The bedroom itself should also be a relaxing and hygienic environment with no other associations or uses beyond sleep and sex.
For recurrent nightmares, an effective treatment is "imagery rehearsal," which encourages people to visualize and rehearse positive outcomes to the nightmare whilst awake.
Alongside regular exercise, specific practices for relaxation, such as yoga and meditation, have also been found to be useful.