Your heartburn is a result of gastroesophageal reflux disease (GERD), a process in which stomach acid refluxes up through a weakened sphincter that separates the lower esophagus from the stomach. When acid refluxes up into the lower portion of the esophagus, it can irritate the inner mucosal lining, causing the sensation of heartburn. Many patients notice that their symptoms are at their worst when they are laying down at night or when they wake up in the morning. This is because laying flat makes it easier (as a result of gravity) for the stomach acid to reflux into the esophagus.
It is common for patients to notice certain foods or drinks that trigger their symptoms; often identified are sodas, alcohol and spicy foods. In your case, the carbonation and acidity of the cola is likely exacerbating your reflux. Fortunately, there are some measures which can be taken to alleviate your symptoms. You should cut out foods that trigger your symptoms. You should avoid late-night meals, and you should try elevating the head of the bed (i.e., sleep on an extra pillow).
If these measures don't work, you can try taking medication, which can be very effective. You should talk to your primary care doctor
about the medications available; one such over-the-counter medication is Prilosec OTC.