The transport of sediment by a fluid along the surface is responsible for dune formation, dust entrainment and for a rich diversity of patterns on the bottom of oceans, rivers, and planetary surfaces. Most previous models of sediment transport have focused on the equilibrium (or saturated) particle flux. However, the morphodynamics of sediment landscapes emerging due to surface transport of sediment is controlled by situations out-of-equilibrium. In particular, it is controlled by the saturation length characterizing the distance it takes for the particle flux to reach a new equilibrium after a change in flow conditions. The saturation of mass density of particles entrained into transport and the relaxation of particle and fluid velocities constitute the main relevant relaxation mechanisms leading to saturation of the sediment flux. Here we present a theoretical model for sediment transport which, for the first time, accounts for both these relaxation mechanisms and for the different types of sediment entrainment prevailing under different environmental conditions. Our analytical treatment allows us to derive a closed expression for the saturation length of sediment flux, which is general and can thus be applied under different physical conditions.