A theoretical study of the mechanisms of the relaxation in solid H2 and solid D2 related with their nuclear magnetic resonances is given. When the self-diffusion of the molecules is not significant, the predominant nuclear relaxation mechanism is considered to result from the intramolecular interaction modulated by the intermolecular interaction which makes the orientations of hte molecules change from time to time. The formula for T1 due to this mechanism is given and the actual calculations are carried out for solid H2 and solid D2 at temperatures well above the transition point. The result for H2 agrees with Bloom's (> 11°K) and Hatton-Rollin's (4.2 ∼ 10°K) experimental values. The effect of self-diffusion on T1 is treated both for H2 and D2 using the B.P.P. theory and the values of the self-diffusion time estimated from Bloom's data for T2. This effect is small under Bloom's experimental condition (30 Mc), while it is important in Hatton-Rollin's case (5.4 Mc). This agrees with their experimental results though for the latter case the theoretical temperature dependence of T1 is stronger than the experimental one. Discussion is also given on the case where the self-diffusion becomes very rapid and it modulates appreciably the intermolecular forces dependent on the orientation of the molecules. Bloom's experiment in the liquid state seems to be explained by this mechanism. The role of the spin-spin relaxation in establishing the thermal equilibrium within the whole spin system is discussed. This effect will be especially important for solid D2.