Basically it is being applied to the kinetic energy system. Said kinetic energy is transformed both in the movement as such, as well as in the sound effects by which it is heard (Sound Energy) and in heat caused by friction between the pieces (Thermic Energy). While the system is moving, it is likely that a sound related to the grains of sand will be heard immediately and these will increase their temperature due to friction
This explanation can be based on the first law of thermodynamics, which warns that for a closed system energy is transformed, but never destroyed. All types of transformed energy, if added together, can be considered as the total energy given initially on the system.