We study time dependence of various measures of entanglement (covariance entanglement coefficient, purity entanglement coefficient, normalized distance coefficient, entropy coefficients) between resonantly coupled modes of the electromagnetic field in ideal cavities with oscillating boundaries. Two types of cavities are considered — a three-dimensional cavity possessing eigenfrequencies ω3 = 3ω1, whose wall oscillates at the frequency ωw = 2ω1, and a one-dimensional (Fabry–Perot) cavity with an equidistant spectrum ωn = nω1 where the distance between perfect mirrors oscillates at the frequencies ω1 and 2ω1. The behavior of entanglement measures in these cases turns out to be completely different, although all three coefficients demonstrate qualitatively similar time dependences in each case (except some specific situations where the covariance entanglement coefficient based on traces of covariance submatrices seems to be essentially more sensitive to entanglement than other measures, which are based on determinants of covariance submatrices). Different initial states of the field, namely, vacuum, squeezed vacuum, thermal, Fock, and even/odd coherent states, are considered.