The self-energy interaction of atoms placed in air voids of one-dimensional photonic crystals with high-refractive layers is considered. Modification of the interaction of an electron with its own radiation field in the photonic crystal medium gives rise to a correction to its mass and kinetic energy. We demonstrate the photonic density of states of the periodic structure and the dependence of the mass correction of the valence electron of hydrogen atom and the alkali metals on the refractive index of the one-dimensional photonic crystal based on alternating amorphous hydrogenated layers of silicon nitride a-SiN x : H and vacuum, and layers of the high refractive index metamaterial consisting of Au nanoparticles with a dielectric matrix based on HfO2 and vacuum. The tunability of these materials gives rise to the tunability of the mass correction over a wide range. It is shown that the effect under study leads to significant shifts in the energy levels of atoms which is important for controlling physical and chemical processes, creating new linear light sources, and He-Ne-like lasers.