In the theory of Bethe-ansatz integrable quantum systems, rapidities play an important role as they are used to specify many-body states, apart from phases. The physical interpretation of rapidities going back to Sutherland is that they are the asymptotic momenta after letting a quantum gas expand into a larger volume making it dilute and noninteracting. We exploit this picture to make a direct connection to quantities that are accessible in sudden-expansion experiments with ultracold quantum gases. By a direct comparison of Bethe-ansatz and time-dependent density matrix renormalization group results, we demonstrate that the expansion velocity of a one-dimensional Fermi-Hubbard model can be predicted from knowing the distribution of occupied rapidities defined by the initial state. Curiously, an approximate Bethe-ansatz solution works well also for the Bose-Hubbard model.