Both magnesium oxide and magnesium hydroxide are stable at high temperatures and are typically mostly insoluble in water.
Magnesium oxide (MgO) reacts with water (H2O) under certain conditions to form the alkaline magnesium hydroxide (Mg(OH)2).
MgO + H2O → Mg(OH)2
This reaction can be reversed by heating the solution.