  We present a study of collapse-revival patterns that appear in the changes of
atomic populations induced by the interaction of ultracold two-level atoms with
electromagnetic cavities in resonance with an $m$-photon transition of the
atoms ($m$-photon mazer). In particular, sech$^2$ and gaussian cavity mode
profiles are considered and differences in the collapse-revival patterns are
reported. The quantum theory of the $m$-photon mazer is written in the
framework of the dressed-state coordinate formalism. Simple expressions for the
atomic populations, the cavity photon statistics, and the reflection and
transmission probabilities are given for any initial state of the atom-field
system. Evidence for the population trapping phenomenon which suppress the
collapse-revivals in the $m$-photon mazer is given.
