We present results of density functional theory (DFT) calculation of the structural supermodulation in BSCCO-2212 structure, and show that the supermodulation is indeed a spontaneous symmetry breaking of the nominal crystal symmetry, rather than a phenomenon driven by interstitial O dopants. The structure obtained is in excellent quantitative agreement with recent x-ray studies, and reproduces several qualitative aspects of scanning tunnelling microscopy (STM) experiments as well. The primary structural modulation affecting the CuO_2 plane is found to be a buckling wave of tilted CuO_5 half-octahedra, with maximum tilt angle near the phase of the supermodulation where recent STM experiments have discovered an enhancement of the superconducting gap. We argue that the tilting of the half-octahedra and concommitant planar buckling are directly modulating the superconducting pair interaction.