The unitarity of time evolution, or colloquially the conservation of probability, sits at the heart of our descriptions of fundamental interactions via quantum field theory. The implications of unitarity for scattering amplitudes are well understood, for example through the optical theorem and cutting rules. In contrast, the implications for in-in correlators in curved spacetime and the associated wavefunction of the universe, which are measured by cosmological surveys, are much less transparent. For fields of any mass in de Sitter spacetime with a Bunch-Davies vacuum and general local interactions, which need not be invariant under de Sitter isometries, we show that unitarity implies an infinite set of relations among the coefficients ψ_{
n
} of the wavefunction of the universe with n fields, which we name Cosmological Optical Theorem. For contact diagrams, our result dictates the analytic structure of ψ_{
n
} and strongly constrains its form. For example, any correlator with an odd number of conformally-coupled scalar fields and any number of massless scalar fields must vanish. For four-point exchange diagrams, the Cosmological Optical Theorem yields a simple and powerful relation between ψ_{3} and ψ_{4}, or equivalently between the bispectrum and trispectrum. As explicit checks of this relation, we discuss the trispectrum in single-field inflation from graviton exchange and self-interactions. Moreover, we provide a detailed derivation of the relation between the total-energy pole of cosmological correlators and flat-space amplitudes. We provide analogous formulae for sub-diagram singularities. Our results constitute a new, powerful tool to bootstrap cosmological correlators.