We investigate the optimal parameters of the 4D space-time Gibbs priors used in the 4D MAP-RBI-EM method for application to gated myocardial perfusion (GMP) SPECT. The Gibbs prior can be defined by a clique structure, the derivative of a generalized potential function (DGPF) with 3 parameters, and the overall weight of the prior. We used simulated data from a realistic 4D NCAT phantom modeling the uptake distribution of Tc-99m Sestamibi and the detected counts of a typical GMP SPECT study. The cardiac cycle was divided into 8, 16, 24 and 36 gates with the same total acquisition time. The normalized mean squared error (NMSE) and normalized standard deviation (NSD) were used to describe the spatial and temporal resolution, and image noise magnitude, respectively. The optimized values were determined as those that minimize both NMSE and NSD simultaneously. The phantom-matching motion error (PME) was calculated for the motion error between the motions of the left ventricular (LV) wall in the reconstructed images and the corresponding phantom slices. The results show the 4D MAP-RBI-EM with optimized parameters provides substantial improved reconstructed image quality as compared to the 3D OS-EM method with and without correction of other image degrading factors. We conclude that the 4D MAP-RBI-EM provides significantly higher GMP SPECT image quality with less motion error thus enabling more number of cardiac gates in GMP SPECT resulting in better visualization of LV wall motion.