The interplay of superconductivity with electronic and structural instabilities on the kagome lattice provides a fertile ground for the emergence of unusual phenomena. The vanadium-based kagome metals AV3Sb5 (A = K, Rb, Cs) exhibit superconductivity on an almost ideal kagome lattice, with the superconducting transition temperature Tc forming two domes upon pressure-tuning. The first dome arises from the competition between superconductivity and a charge-density-wave, whereas the origin for the second dome remains unclear. Herein, we show that the appearance of the second superconducting dome in KV3Sb5 and RbV3Sb5 is associated with transitions from hexagonal P6/mmm to monoclinic P2/m structures, evidenced by splitting of structural peaks from synchrotron powder X-ray diffraction experiments and imaginary phonon frequencies in first-principles calculations. In KV3Sb5, transition to an orthorhombic Pmmm structure is further observed for pressure p≥20 GPa, and is correlated with the strong suppression of Tc in the second superconducting dome. Our findings indicate distortions of the crystal structure modulates superconductivity in AV3Sb5 under pressure, providing a platform to study the emergence of superconductivity in the presence of multiple structural instabilities.