Two-photon transitions for hydrogen and hydrogenlike ions in arbitrary magnetic fields are investigated using currently available nonrelativistic energy levels and one-photon dipole transition probabilities. For hydrogen, the 2s-1s two-photon spontaneous-decay rate is shown to increase rapidly with the strength of the applied field from its field-free value of 8.2284 ${\mathrm{s}}^{\mathrm{\ensuremath{-}}1}$ to a maximum of 1.537\ifmmode\times\else\texttimes\fi{}
108 ${\mathrm{s}}^{\mathrm{\ensuremath{-}}1}$ at 1.41\ifmmode\times\else\texttimes\fi{}
106 T, approaching that of the 2p-1s one-photon rate, and to drop slightly to 1.055\ifmmode\times\else\texttimes\fi{}
108 ${\mathrm{s}}^{\mathrm{\ensuremath{-}}1}$ at 4.7\ifmmode\times\else\texttimes\fi{}
108 T. The transition rate is shown to scale as
Z4 for hydrogenic ions with nuclear charge Z in fields \ensuremath{\ge}3300
Z2 T. The spectral distribution of the photons for the 2s-1s transition in a large field reveals interesting features including resonances due to migration of the 2
p0 and 2${\mathit{p}}_{\mathrm{\ensuremath{-}}1}$ energy levels between the 1s and 2s levels and the appearance of minima resulting from destructive interference between the intermediate-state dipole terms. In the field-free case, these spectral features are only present for high-lying-state transitions, i.e., 3s-1s, 4s-1s, etc.
We study the magic wavelength for two-photon 1S–nS transitions in a hydrogen and deuterium atom, as well as 2S–nS transitions, where the lower level is the metastable 2S state. At the magic wavelength, the dynamic Stark shifts of the ground and the excited state of the transition coincide, so that the transition frequency is independent of the intensity of the trapping laser field. Experimentally feasible magic wavelengths of transitions with small slopes in the atomic polarizabilities are determined; these are the most stable magic wavelengths against variations of the laser frequency. We provide data for the magic wavelengths for the 1S–nS and 2S–nS transitions in hydrogen and deuterium, with n=2,⋯,8. We also analyze the stability of the elimination of the ac Stark shift at the magic wavelength against tiny variations of the trapping laser frequency from the magic value.