  Electron-phonon ($e$-ph) interactions are key to understanding the dynamics
of electrons in materials, and can be modeled accurately from first-principles.
However, when electrons and holes form Coulomb-bound states (excitons),
quantifying their interactions and scattering processes with phonons remains an
open challenge. Here we show a rigorous approach for computing exciton-phonon
(ex-ph) interactions and the associated exciton dynamical processes from first
principles. Starting from the ab initio Bethe-Salpeter equation, we derive
expressions for the ex-ph matrix elements and relaxation times. We apply our
method to bulk hexagonal boron nitride, for which we map the ex-ph relaxation
times as a function of exciton momentum and energy, analyze the temperature and
phonon-mode dependence of the ex-ph scattering processes, and accurately
predict the phonon-assisted photoluminescence. The approach introduced in this
work is general and provides a framework for investigating exciton dynamics in
a wide range of materials.
