SrFeO2 is an insulating antiferromagnet with a remarkably high transition temperature in spite of its quasi-two-dimensional crystal structure. The magnetic exchange coupling is, however, very sensitive to a local mode involving transverse displacements of O and Fe, resulting in zigzag patterns of distortion. The buckling driven by rising temperatures is enhanced just as the Fe magnetic moment is reduced, implying a strong spin-lattice coupling. It is suggested that the undulations lead to orbital disorder by distorting the three possible paths to exchange interactions.