Recently, an alkaline earth hydride CaH6 having a sodalitelike clathrate structure has been experimentally synthesized at megabar pressures with a maximum T
c of 215 K, comparable to that of a rare earth hydride LaH10. Here, based on first-principles calculations, we find that CaH6 exhibits a huge peak in the Eliashberg spectral function α2
F around the low-frequency region of H-derived phonon modes, in contrast to LaH10 having a widely spreading spectrum of α2
F over the whole frequencies of H-derived phonon modes. It is revealed that the huge peak of α2
F in CaH6 is associated with an effective electron-phonon coupling (EPC) between low-frequency optical phonons and hybridized H 1s and Ca 3d states near the Fermi energy. As pressure increases, the strengthened H−H covalent bonding not only induces a hardening of optical phonon modes but also reduces the electron-phonon matrix elements related to the low-frequency optical modes, thereby leading to a lowering of the EPC constant. It is thus demonstrated that H-derived low-frequency phonon modes play an important role in the pressure-induced variation of T
c in CaH6. Furthermore, unlike the presence of two distinct superconducting gaps in LaH10, CaH6 is found to exhibit a single isotropic superconducting gap.