Both polydispersity and the presence of a gravitational field are inherent to essentially any colloidal experiment. While several theoretical works have focused on the effect of polydispersity on the bulk phase behavior of a colloidal system, little is known about the effect of a gravitational field on a polydisperse colloidal suspension. We extend here the sedimentation path theory to study sedimentation-diffusion-equilibrium of a mass-polydisperse colloidal system: the particles possess different buoyant masses but they are otherwise identical. The model helps to understand the interplay between gravity and polydispersity on sedimentation experiments. Since the theory can be applied to any parent distribution of buoyant masses, it can also be used to study the sedimentation of monodisperse colloidal systems. We find that mass-polydispersity has a strong influence in colloidal systems near density matching for which the bare density of the colloidal particles equals the solvent density. To illustrate the theory, we study crystallization in sedimentation-diffusion-equilibrium of a suspension of mass-polydisperse hard spheres.