A Gifford-McMahon Refrigerator based on the Simon expansion is a gas cryocooler, in which the helium is compressed at ambient temperature and expands at refrigerating temperature, from the view point of a thermodynamic cycle. This phenomena no longer exists in a 4.2K G-M refrigerator with the magnetic regenerative matrix in the cold regenerator, when the operating temperature reaches the liquid helium temperature, because of the unique features of the low temperature regenerator. The most helium expanding in the cold space is compressed in the void volume of the cold regenerator, and the compression heat becomes the main loss of the cooling capacity. Because the regenerator matrix with a limited specific heat can not absorb all the compression heat [1,2], which can't be avoided. In this condition, it is necessary to ensure that the helium, as far as possible, is compressed in the cold regenerator, not in the cold chamber, where no matrix. Owing to the existence of the flow resistance, the time for the build-up and come-down of the pressure in the cold chamber can not be neglected. Hence, it's certain that a part of helium is compressed in the cold chamber. In order to decrease this part of loss, the selection of the valve-timing is very important. Thus, the numeric simulation of the influence of the valve timing on a 4.2K Gifford-McMahon refrigerator is performed in this paper and the optimization of the valve timing is obtained.