Could be gastritis (stomach lining inflammation). My mother takes digestive enzyme supplements (proteases - enzymes that digest protein - heal the stomach lining) which gets rid of the gastritis pain.
The gall bladder is located in the upper to middle right quadrent of the belly. You could feel pain over the entire top portion of your stomach. Alcohol, fatty or spicey foods tend to bring it on. Gall stones are another possibility. The liver is in that area as well but he would possibly have other symptoms as well if the liver were involved. Try eating a bland diet, alcohol free, for a day or so.
Laying down can cause acid reflux, but you say the pills he gave you are not working. Try elevating his bed with pillows between the mattress and box springs. That will keep him semi upright when sleeping. If this fails, google gall bladder and diet.
Good luck, and hope he feels better soon
...Kim..