Optical aberrations limit resolution in biological tissues, and their influence is particularly large for promising techniques such as light-sheet microscopy. In principle, image quality might be improved by adaptive optics (AO), in which aberrations are corrected by using a deformable mirror (DM). To implement AO in microscopy, one requires a method to measure wavefront aberrations, but the most commonly used methods have limitations for samples lacking point-source emitters. Here we implement an image-based wavefront-sensing technique, a variant of generalized phase-diverse imaging called multiframe blind deconvolution, and exploit it to calibrate a DM in a light-sheet microscope. We describe two methods of parameterizing the influence of the DM on aberrations: a traditional Zernike expansion requiring 1040 parameters, and a direct physical model of the DM requiring just 8 or 110 parameters. By randomizing voltages on all actuators, we show that the Zernike expansion successfully predicts wavefronts to an accuracy of approximately 30 nm (rms) even for large aberrations. We thus show that image-based wavefront sensing, which requires no additional optical equipment, allows a simple but powerful method to calibrate a deformable optical element in a microscope setting.