The periodic matrix equations are strongly related to analysis of periodic control systems for various engineering and mechanical problems. In this work, a matrix form of the conjugate gradient for least squares (MCGLS) method is constructed for obtaining the least squares solutions of the general discrete-time periodic matrix equations \[ um^t_{j=1}(A_{i,j}X_{i,j}B_{i,j}+C_{i,j}X_{i+1,j}D_{i,j})=M_i,\qquad i=1,2,\dots \] It is shown that the MCGLS method converges smoothly in a finite number of steps in the absence of round-off errors. Finally two numerical examples show that the MCGLS method is efficient.