A new integral representation of the solutions of multi-term matrix equations with commuting matrices is proposed. Spectral decompositions of these solutions are derived. In the special case they coincide with the decompositions for the solutions of Krein equations obtained earlier. The results are applicable to the Sylvester and Lyapunov equations for linear and some bilinear systems. The practical significance of the obtained spectral decompositions is that they allow one to characterize the contribution of individual eigencomponents and their combinations into the asymptotic dynamics of perturbation energy in linear and some bilinear systems.