Computational thermodynamics using density functional theory ab initio codes is a powerful tool for calculating phase diagrams. The method is usually applied at the standard pressure of p = 1 bar and where the Gibbs energy is assumed to be equal to the Helmholtz energy. In this work, we have calculated the Gibbs energy in order to study the release temperature and phase modifications of MgH(2) at high pressures up to 10 GPa (100 kbar). The isotopic substitution of hydrogen with deuterium (or tritium) does not bring about any strong effects on the phase diagram. These considerations are of extreme importance for (i) the synthesis of novel substitutional magnesium based materials at high pressure and (ii) the determination of the correct reference states for the calculation of phase diagrams at high pressure. The calculated results are compared with experimental data obtained with an in situ neutron diffraction measurement.