Magnesium hydroxide `[Mg(OH)_(2)]` is a batter antacid because being insoluble it does not allow the pH to increase neturaility. On the other han, sodium hydrogen carbonate being soluable and its excess amount can make the stomach alkaline and trigger the production of even more acid.