As follows from the experimental studies on impact loading of materials (for instance, metals) in stress relaxation the energy exchange between macro- and mesoscopic scale levels occurs even before the onset of dissipation. The problem of nonstationary wave propagation in the relaxing medium with the account of such mesoscopic characteristics as mass-velocity dispersion and scale and type parameters of mesostructures has been formulated on the basis of self-congruent nonlocally-hydrodynamic approach. It is established that the dynamic behavior of materials is controlled by the thermodynamics of macromesointerchange of energy. In particular, the experiment has revealed that the maximum spalling strength appears under dynamic equilibrium conditions with the minimal rate of entropy increase.