We study the placement of surface-bonded piezoelectric actuators to control or minimize the deformation due to changes in temperature and moisture content in linear elastic and linear viscoelastic cantilever beams. The effect of unsteady heat and moisture diffusion phenomena on the response characteristics of the elastic and viscoelastic beams, such as displacement, stress, and strain fields, is examined based on which the magnitude of external actuating voltage to minimize deformation is predicted. This is followed by a comparative study of the field variables in cases of actuated and unactuated beams. Finite difference method is used to solve the field equations numerically. The numerical results are corroborated by comparing the results with analytical and experimental results that are available. Relatively smaller magnitude of external actuating voltage is necessary to minimize bending in the viscoelastic structure compared to the elastic structure due to the phenomenon of stress relaxation.