A novel feature of the iron arsenides is the magnetoelastic coupling between the long wavelength in-plane strains of the lattice and the collective spin fluctuations of the electrons near the magnetic ordering wavevectors. Here, we study its microscopic origin from an electronic model with nested Fermi pockets and a nominal interaction. We find the couplings diverge with a power-law as the system is tuned to perfect nesting. Furthermore, the theory reveals how nematicity is boosted by nesting. These results are relevant for other systems with nesting driven density wave transitions.