GERD stands for Gastroesophageal Reflux Disease. It is a relatively broad term to describe the symptoms of heartburn caused by acid refluxing from your stomach into your lower esophagus, causing a burning sensation in your upper abdomen/lower chest.
The stomach normally produces hydrochloric acid which aids in digestion of food. The esophagus is the muscular, tubular structure connecting the back of your throat and mouth to your stomach. It has two sphincters - an upper esophageal sphincter and a lower esophageal sphincter. Sometimes, the lower esophageal sphincter has weak muscle tone and thus some of the stomach acid can escape and move up into the esophagus which is not used to acid exposure. There are certain things that can weaken the lower esophageal sphincter and cause more pronounced symptoms of GERD. Spicy food and caffeinated beverages are two examples of foods/drinks that can decrease the lower esophageal sphincter tone, thereby allowing more stomach acid to reash the esophagus and cause heartburn symptoms.
Normally, eating food causes the stomach to make more acid, so if you eat food late at night right before bed, your stomach will have more acid that can make its way to the esophagus. This becomes even more pronounced when you lay down and the acid is able to reach the esophagus just because of gravity.
It is thus advised to avoid eating late at night, right before bed so that once you do go to bed, you don't have a lot of acid in your stomach.
In terms of waking up in the middle of the night and inability to go back to sleep -- there are a multitude of reasons why this may be happening. You should speak with your family medicine physician
to review and treat your reflux (usually with a medication class called the proton pump inhibitor) and address your issue with waking up in the middle of the night. If its reflux that is waking you up at night, then it may be due to GERD. however if you have no symptoms that are causing you to wake up and it happens spontaneously, it is not likely related to GERD. Either way, please discuss with your primary care doctor
or gastroenterologist, who can provide further insight and treatment to both problems.