If your upper abdominal pains are exacerbated by meals, bending or recumbency, and are associated with heartburn, you should be investigated for gastroesophageal reflux disease (GERD). The sour taste you experience is due to reflux of gastric contents into the mouth, and is a common complaint in GERD. Upper endoscopy is the usual procedure for investigating this condition.
You should also have a test for Helicobacter pylori, which is a common cause of dyspepsia, hyperacidity, gastritis and peptic ulcer disease. I am assuming that you are not on long term medications for pain which could cause erosive gastritis.
It is advisable to consult a gastroenterologist for further management. I hope this information is helpful.
Dr Anthony Solomon
MB BS DTM&H DIP.VEN FRSM
Consultant Physician, Tropical & Genitourinary Medicine