Milk of magnesia is an old fashioned remedy for treatment of indigestion. It contains magnesium hydroxide and is also used as a laxative, as magnesium hydroxide causes diarrhoea when taken in excess.
There are more modern combination mixtures available, but occasionally we still see magnesium hydroxide used in the community. It acts to neutralise the effects of stomach acid.
Does this answer your question?