This study is concerned with the synthesis of periodically time-varyingmemory state-feedback controllers (PTVMSFCs) for discrete-time linear systems. In our preceding studies, we have already established basic strategiesfor LMI-based (robust) H-infinity PTVMSFCs synthesis, and in this paper we extend those results to the H2 performance criterion. In the H2 case, the main difficulty stems from the fact that we have to ensure the existence of a common solutionfor multiple LMI conditions that are related toLyapunov inequality and inequalities for bounding traces of Lyapunov matrix. We overcome this difficulty by deriving an analytic representationof LMI solutions and derive a necessary and sufficientLMI condition for the H2-PTVMSFCs synthesis. Based on these results, we also consider robust H2-PTVMSFC synthesis for polytopic-type uncertain LTI systems.