Hi Dave:
Sorry you are feeling so much discomfort. Since you are posting in an Acid Reflux message board, I assume you suspect you have GERD. Does the pain come predominantly at night? If so, it might be reflux. Does it come two or so hours before you eat? Does it improve with antiaciRAB? Those may all be telltell signs that you are suffering from reflux.
Xanax can relax the Lower Esophageal Sphincter or the valve that prevents acid from splashing back up into the esophagus where it is not supposed to be. Do you take your Xanax at night? If so, it may cause reflux. Also, make sure you take all pills with some type of food to buffer your stomach from the medicine no matter how big or small the pill might be.
Maybe taking a bit of Gaviscon at night might help keep the pain away while you sleep. Gaviscon is a type of antiacid (alginate) that keeps stuff down in your stomach. It provides a foam layer that keeps the food and aciRAB from going back into the esophagus.
I don't know if you have consulted with your doctor, but that may be a good idea to rule out other potential problems like your heart, etc. I don't say this to increase your anxiety and doubt you have heart problems. But it is reasonable to go down a checklist and try to eliminate all the potential sources.
Hope you get rid of that pain soon.
Rose