Elastic energy absorption measurements versus temperature on semiconducting, semi-insulating (SI) and Fe-doped InP are reported. A thermally activated relaxation process is found only in the SI state, which is identified with the hopping of H atoms trapped at In vacancies. It is proposed that the presence of In vacancies in InP prepared by the liquid encapsulated Czochralski method is due to the lowering of their energy by the saturation of the P dangling bonds with H atoms dissolved from the capping liquid containing H2O. The conversion of iron-free InP to the SI state following high temperature treatments would be due to H loss with the transformation of the H-saturated In vacancies, V_In-H_4 donors, into neutral and acceptor V_In-H_n complexes with n < 4. Such complexes would produce the observed anelastic relaxation process and may also act as deep acceptors which neutralize unwanted donor impurities.