The behavior of the thermal pressure, PTH, in MgO and MgSiO3 perovskite is investigated at lower mantle conditions using first-principles lattice dynamical calculations based on density functional perturbation theory. In both cases, PTH is a slowly varying function of volume: it decreases linearly with compression at low temperatures but shows a slight non monotonical trend at high temperatures. Because PTH strongly increases with increasing temperature, its volume-induced variations at high temperatures (above 1000 K) can be neglected to a good approximation. It is possible to estimate the thermal equations of state of these minerals at typical lower mantle temperatures only with the knowledge of the measured PTH vs. temperature data at ambient pressure and isothermal compression data at ambient temperature. The coefficient of thermal expansion for MgO at high pressures and temperatures obtained in this manner agrees well with the first-principles predictions and available experimental data.