More Info: Eating a late night snack is not always a catalyst for nightmares, but it can increase the likelihood. Eating increases the body’s metabolism, which signals the brain to become more active. This can result in dreaming while you sleep. If you are suffering from other disorders that can trigger nightmares, such as stress or sleep deprivation, the result could be disturbing nightmares.
Foods to Avoid Ward off Nightmares
Though likely not the direct cause of nightmares, research indicates that eating particular foods before bed may exacerbate the situation. Foods that are high in protein and fat have been demonstrated to interrupt the sleep cycle.  Foods containing caffeine such as coffee or chocolate are also sleep disrupters.  Spicy foods are especially problematic to the comfortable sleep for those that suffer from gastrointestinal acid reflux disease.  Finally, alcohol is also associated with disrupting sleep patterns. 
Foods that May Help to Promote Sleep
Going to bed hungry can cause sleep disruptions as well as eating too much. A light snack that contains tryptophan and a light carbohydrate may be just what you need. Tryptophan is an amino acid used by the body to make serotonin, which is believed to promote healthy sleep. Tryptophan can be found in many foods such as milk, cheese, eggs, peanut butter, poultry, soy, and tofu. Carbohydrates boost tryptophan levels in the bloodstream so adding a few crackers to the snack may help even more. 
Negative Effects of Eating before Bed
Gorging yourself before bed is problematic beyond causing sleep disruptions.
Heartburn. The incidence of nighttime heartburn disrupting sleep patterns is exacerbated by eating before bed. Certain foods seem to be associated with a higher frequency of incidence such as citrus, chocolate, caffeine, high-fat foods, garlic, mint, spicy foods, and tomato based foods. 
Stroke. Research indicates that waiting to go to bed at least one hour following a meal decreases your risk for stroke by more than 66%. And for each 20 minutes that you wait beyond that further reduces the risk by 10%. Researchers theorize that the increased risk may be due to all the changes your body goes through following a meal such as changes in blood sugar, cholesterol levels, and blood flow. 
Asthma. Eating before bed can have life-threatening affects for asthmatics. Eating before bed exacerbates GERD symptoms and can include nocturnal suffocation, coughing, and wheezing. 
Catherine M. Kotz, University of Minnesota and Veterans Affairs Medical Center, Minneapolis, MN, USA
Weight gain induced by high-fat diet increases active-period sleep and sleep fragmentation
“You may not think what happens at your dinner table has much to do with your nights of tossing and turning, but there is a connection. Diets high in refined sugar can cause indigestion and trigger insulin surges that interfere with the hormones that affect sleep. The solution: low-fat and high-fiber foods. When you eat is as important as what you eat for a peaceful night. Eating late at night forces your body and brain to be digesting instead of resting.”