Nuclear magnetic resonance (NMR) is typically used in the petroleum industry to characterize pore size and to identify fluids in fully and partially saturated reservoir samples. Although the NMR-relaxation response can be used to estimate the permeability of the rock, it may also provide information about the fluid distribution for multiphase systems that could lead to the estimation of the effective permeability of fluids at partial saturations and the derivation of relative permeability to assess hydrocarbon recovery. By use of a random-walk method, we simulate the NMR response as a function of saturation on tomographic images of Bentheimer and Berea sandstone as well as Ferroan dolomite samples. Fluid distributions are simulated for fully water-wet conditions by use of a morphological capillary-drainage transform, allowing the calculations of the saturations directly on the images corresponding to capillary pressure. The magnetic susceptibility of minerals and fluids is used to calculate the internal magnetic fields from the material distributions of solids and fluids quantified by X-ray-diffraction (XRD) analysis. We show that the logarithmic mean of the NMR T2 distribution is a robust measure of permeability, and it results in strong correlations between NMR response and the relative permeability of both fluids. The observed relative permeability from NMR in our work is in excellent agreement with image-based relative permeability calculations by use of the lattice Boltzmann method (LBM). We compare our NMR results for the wetting phase to published experimental results on Bentheimer and Berea sandstone samples, and we observe excellent agreement. By use of NMR numerical calculations, we demonstrate that internal gradients aid the establishment of relative permeability correlations for the nonwetting phase.