Owing to their small mass, hydrogen atoms exhibit strong quantum behavior even at room temperature. Including these effects in first-principles calculations is challenging because of the huge computational effort required by conventional techniques. Here we present the first ab initio application of a recently developed stochastic scheme, which allows to approximate nuclear quantum effects inexpensively. The proton momentum distribution of lithium imide, a material of interest for hydrogen storage, was experimentally measured by inelastic neutron-scattering experiments and compared with the outcome of quantum thermostatted ab initio dynamics. We obtain favorable agreement between theory and experiments for this purely quantum-mechanical property, thereby demonstrating that it is possible to improve the modeling of complex hydrogen-containing materials without additional computational effort. © 2010 The American Physical Society.