According to experts, nightmares are vividly realistic, disturbing dreams that wakes you up suddenly from a deep sleep. They can make your heart race faster due to fear. Nightmares tend to occur often during 'rapid eye movement (REM)'- Rapid eye movement is the period of sleep that occurs at intervals during the night. It is a period in your sleep you tend to start dreaming and also faster pulse rate and increased breathing normally takes place during this period. Because periods of REM sleep become progressively longer as the night progresses, you may find you experience nightmares most often in the early morning hours.
However, some studies have shown that eating before going to bed immediately can cause one to have nightmares. This is because the food is going to make your body to boost its metabolism and increase its temperature which leads to more brain activity during Rapid Eye Movement (REM) sleep which is the period in your sleep you tend to have dreams.
A study by the University of Montreal Canada, discovered a correlation between food, eating before bed and nightmares. In their study, they found that 9.5% of the study’s participants reported a link between late eating and nightmares.
Another study found that ice cream and candy bars can trigger an increase in brain wave actions. The study also revealed that just going to bed on a full stomach, regardless of what you have eaten, can cause nightmare-inducing brain waves.