Frequency upconversion of an electromagnetic wave can occur in ionized plasma with decreasing electric permittivity and in split-ring resonator-structure metamaterials with decreasing magnetic permeability. We develop a general theory to describe the evolution of the wave frequency, amplitude, and energy density in homogeneous media with a temporally decreasing refractive index. We find that upconversion of the wave frequency is necessarily accompanied by partitioning of the wave energy into low-frequency modes, which sets an upper limit on the energy conversion efficiency. The efficiency limits are obtained for both varying permittivity and varying permeability.