Highly evanescent nanophotonic waveguides enable extremely efficient Raman spectroscopy in chip-scale photonic integrated circuits due to the continuous excitation and collection of Raman scattering along the entire waveguide length. Such waveguides can be used for detection and identification of condensed-phase analytes, or, if functionalized by a sorbent as a top-cladding, can be used to detect trace concentrations of chemical species. The scattering efficiency is modified in guided-mode structures compared to unconfined, micro-Raman geometries. Here, we describe the theoretical framework for understanding the Raman scattering efficiency in nanophotonic waveguides, and compare these calculations to our measurements of trace gases in hypersorbent-clad silicon nitride waveguides.