We introduce a Bayesian inference approach to analyze magnetic resonance data of granular solids. To characterize structure using magnetic resonance, it is usual to acquire data in k space which are then Fourier transformed to obtain an image. An alternative approach, adopted here, is to utilize the Rayleigh distribution observed in the signal intensity for a given k when a random selection of grains is measured in k space, to define a likelihood function for Bayesian analysis. This Bayesian likelihood function is used to noninvasively characterize grains within a porous medium on length scales below the practical resolution of magnetic resonance imaging. A pore size distribution is then calculated from the measured grain size distribution using a Monte Carlo approach. We demonstrate this general technique with specific examples of water-saturated rock cores.