The spin-spin relaxation rate R2 (=1/T2) in hydrogel foams measured by use of a multiple spin echo sequence is found to be dependent on the echo time spacing. This property, referred to as R2-dispersion, originates to a large extent from molecular self-diffusion of water within internal field gradients that result from magnetic susceptibility differences between the gel and air phase. Another contribution to the R2 relaxation rate is surface relaxation. Numerical simulations are performed to investigate the relation between the foam microstructure (the mean air bubble radius and standard deviation of the air bubble radius) and foam composition properties (such as magnetic susceptibilities, diffusion coefficient and surface relaxivity) at one hand and the R2-dispersion at the other hand. The simulated R2-dispersions of gel foam are in agreement with the measured R2-dispersions. By correlating the R2-dispersion parameters and simulated microstructure properties a semi-empirical relationship is obtained that enables the mean air bubble size to be derived from measured R2-dispersion curves. The R2-derived mean air bubble size of a hydrogel foam is in agreement with the bubble size measured with X-ray micro-CT. This illustrates the feasibility of using 1H R2-dispersion measurements to determine the size of air bubbles in hydrogel foams and of alveoli in lung tissue.