We study the magnetic response of a ferromagnetic bilayer with antiferromagnetic coupling, where the layers experience magnetostrictive strains and epitaxial misfit strains. These strains cause the layers to stretch and bend as the magnetic spins of the layers rotate, resulting in elastic energy that adds to the magnetic energy of the system. The magnetic and elastic energies are computed as a function of spin direction in each layer for a given set of material and geometric parameters. By finding the rotations that minimize the total energy, we compute magnetic hysteresis loops for different combinations of magnetic and elastic parameters. The elastic contribution is reflected in the transitions at the corners of the hysteresis curves as well as in the coercive field of the main loop. The details of the elastic contribution depend in a complicated way on the magnetostriction of the layers, the epitaxial strain, the magnetic anisotropies, and the system geometry.