People take milk of magnesia as an antacid for indigestion. The active ingredient is magnesium hydroxide. I know I've not mentioned magnesium chloride yet, but be patient.
As antacids hydroxides have an advantage over bicarbonates: when hydroxides neutralize acids, you don't get carbon dioxide formed, so you don't get a belching problem.
The trouble with using magnesium hydroxide to neutralize stomach acid, which is hydrochloric acid, is the product is magnesium chloride. Magnesium chloride is a purgative/laxative, so you might cure your indigestion at the expense of spending some time sitting in the lavatory.