Recent years have seen a renewal of interest in multi-term linear matrix equations, as these have come to play a role in a number of important applications. Here, we consider the solution of such equations by means of the dynamical functional particle method, an iterative technique that relies on the numerical integration of a damped second order dy-namical system. We develop a new algorithm for the solution of a large class of these equations, a class that includes, among others, all linear matrix equations with Hermi-tian positive definite or negative definite coefficients. In numerical experiments, our MAT -LAB implementation outperforms existing methods for the solution of multi-term Sylvester equations. For the Sylvester equation AX + XB = C, in particular, it can be faster and more accurate than the built-in implementation of the Bartels-Stewart algorithm, when A and B are well conditioned and have very different size.