Frequent nightmares can undermine the quality of your sleep and result in chronic depression. A possible cause is a lack of glucides in your diet. If you are on a low-sugar weight-loss program, and have not been careful to replace simple, fast-assimilation sugars with complex, slow sugars, your body is constantly using up its reserves of fat to synthesize its own glucose. This, in turn, can have an effect on your brain, which may not be getting enough sugar. Nightmares are one symptom of cerebral fatigue.
For your evening meal, eat light foods that contain complex sugars: whole grain bread, whole grains, legumes, and so on. You should soon notice a marked improvement in the quality of your sleep, and a drop in the frequency of your bad dreams.