When a perfectly elastic material is deformed, the energy associated with the strain remains stored in the body as elastic potential energy, called strain energy. Upon the removal of the deforming forces, the body completely regains its original shape, size and configuration with no further loss of heat. However, nothing is perfectly elastic! When a partially elastic material (e.g., a rubber band) is deformed, there is always a remnant deformation even upon the withdrawal of the deforming forces. It exhibits hysteresis and part of the energy converted to heat. Here is a quick reference.
How does this remnant deformation responsible for the heating up of the material?
Edit According to one of the $TdS$ equations, $$dT=\frac{T}{C_V}\Big[dS-\Big(\frac{\partial P}{\partial T}\Big)_V dV\Big],$$ we note that a change in temperature is caused by either a change in volume $V$ or a change in entropy $S$ or both. Can we use this to understand what is going on?
My guess is that for the elastic deformation of a perfectly elastic material, during the process of loading $dT$ is negative because $dV>0$ and during unloading $dT$ is positive because $dV<0$. In the whole cycle, when the system comes to its original state, it does not heat up. But for a partially elastic material, the residual permanent deformation may be responsible for a nonzero $dV$, a nonzero $dS$ or both?