We investigated the properties of polarons in a wurtzite ZnO/Mg_{x}Zn_{1-x}O quantum well by adopting a modified Lee-Low-Pines variational method, giving the ground state energy, transition energy, and phonon contributions from various optical-phonon modes to the ground state energy as functions of the well width and Mg composition. In our calculations, we considered the effects of confined optical phonon modes, interface-optical phonon modes, and half-space phonon modes, as well as the anisotropy of the electron effective band mass, phonon frequency, and dielectric constant. Our numerical results indicate that the electron-optical phonon interactions importantly affect the polaronic energies in the ZnO/Mg_{x}Zn_{1-x}O quantum well. The electron-optical phonon interactions decrease the polaron energies. For quantum wells with narrower wells, the interface optical phonon and half-space phonon modes contribute more to the polaronic energies than the confined phonon modes. However, for wider quantum wells, the total contribution to the polaronic energy mainly comes from the confined modes. The contributions of the various phonon modes to the transition energy change differently with increasing well width. The contribution of the half-space phonons decreases slowly as the QW width increases, whereas the contributions of the confined and interface phonons reach a maximum at d ≈ 5.0 nm and then decrease slowly. However, the total contribution of phonon modes to the transition energy is negative and increases gradually with the QW width of d. As the composition x increases, the total contribution of phonons to the ground state energies increases slowly, but the total contributions of phonons to the transition energies decrease gradually. We analyze the physical reasons for these behaviors in detail.