Stomach acid blocking drugs significantly lowered magnesium levels. Magnesium deficiency is assoicated with muscle pain and soreness, insomnia, irritability, and other symptoms.
Less stomach acid means that your body will not absorb as much of the nutrients that require on a higher acid environment for absorption, like many minerals. These drugs also change the pH of your intestines and are linked to a harmful overgrowth of bacteria in the small intestine. Symptoms of this overgrowth include chronic bloating, diarrhea and abdominal pain.
Instead of acid-blocking drugs, identify which foods trigger your symptoms and avoid them. If you are overweight, try to lose weight in order to take physical pressure off the stomach valve that keeps acid out of your esophagus.
FDA Drug Safety Announcement 2011. Current Gastroenterology Reports 2003.