We study the relaxation dynamics of capillary waves in the interface between two confined liquid layers by means of molecular dynamics simulations. We measure the autocorrelations of the interfacial Fourier modes and find that the finite thickness of the liquid layers leads to a marked increase of the relaxation times as compared to the case of fluid layers of infinite depth. The simulation results are in good agreement with a theoretical first-order perturbation derivation, which starts from the overdamped Stokes' equation. The theory also takes into account an interfacial friction, but the difference with no-slip interfacial conditions is small. When the walls are sheared, it is found that the relaxation times of modes perpendicular to the flow are unaffected. Modes along the flow direction are relatively unaffected as long as the equilibrium relaxation time is sufficiently short compared to the rate of deformation. We discuss the consequences for experiments on thin layers and on ultralow surface tension fluids, as well as computer simulations.