They want to return to what is called the 'ground state'. Through scattering with other electrons or with vibrations in the solid itself, they can lose that extra energy. But that energy has to go somewhere. What it does is heat the solid and increase its temperature. If you measure the change in temperature, you can measure how much energy the X-ray originally had.
Heat is a manifestation of energy.
We usually think of energy as heat if we are thinking of the total energy of a large ensemble of objects that can exchange energy with each other and come into equilibrium. So, when an X-ray photon heats a solid, it gives its energy to the whole solid. On average, each atom is vibrating a little bit more than before the X-ray hit. Suppose we wanted to measure the temperature increase due to an X-ray photon being absorbed. We'd want a very sensitive thermometer, something that had some physical property that changed a lot for a small change in temperature.