Motivated by compelling advances in manipulating cold Rydberg (Ry) atoms in optical traps, we consider the effect of the large extent of a Ry electron wave function on trapping potentials. We find that, when the Ry orbit lies outside inflection points in the laser intensity landscape, the atom can stably reside in laser intensity maxima. Effectively, the free-electron ac polarizability of the Ry electron is modulated by the intensity landscape and can accept both positive and negative values. We apply these insights to determining the magic wavelengths for Ry-ground-state transitions for alkali-metal atoms trapped in infrared optical lattices. We find magic wavelengths to be around $10\phantom{\rule{0.28em}{0ex}}\ensuremath{\mu}\mathrm{m}$ with exact values that depend on Ry-state quantum numbers.
Intensity-modulated optical lattice potentials can change sign for an alkali-metal Rydberg atom, and the atoms are not always attracted to intensity minima in optical lattices with wavelengths near the CO
2 laser band. Here we demonstrate that such IR lattices can be tuned so that the trapping potential experienced by the Rydberg atom can be made to vanish for atoms in ``targeted'' Rydberg states. Such state-selective trapping of Rydberg atoms can be useful in controlled cold Rydberg collisions, cooling Rydberg states, and species-selective trapping and transport of Rydberg atoms in optical lattices. We tabulate wavelengths at which the trapping potential vanishes for the
ns,
np, and
nd Rydberg states of Na and Rb atoms and discuss advantages of using such optical lattices for state-selective trapping of Rydberg atoms. We also develop exact analytical expressions for the lattice-induced polarizability for the
mz=0 Rydberg states and derive an accurate formula predicting tune-out wavelengths at which the optical trapping potential becomes invisible to Rydberg atoms in targeted
l=0 states.