A new thermodynamically self-consistent (TSC) method, based on the quasi-harmonic approximation (QHA), is used to obtain the Debye temperatures of LiFePO4 (LFP) and FePO4 (FP) from available experimental specific heat capacities for a wide temperature range. The calculated Debye temperatures show an interesting critical and peculiar behavior so that a steep increase in the Debye temperatures is observed by increasing the temperature. This critical behavior is fitted by the critical function and the adjusted critical temperatures are very close to the magnetic phase transition temperatures in LFP and FP. Hence, the critical behavior of the Debye temperatures is correlated with the magnetic phase transitions in these compounds. Our first-principle calculations support our conjecture that the change in electronic structures, i.e. electron density of state and electron localization function, and consequently the change in thermophysical properties due to the magnetic transition may be the reason for the observation of this peculiar behavior of the Debye temperatures.