Abstract Many accretion discs have been found to be distorted: either warped due a misalignment in the system, or non-circular as a result of orbital eccentricity or tidal deformation by a binary companion. Warped, eccentric, and tidally distorted discs are not in vertical hydrostatic equilibrium, and thus exhibit vertical oscillations in the direction perpendicular to the disc, a phenomenon that is absent in circular and flat discs. In extreme cases, this vertical motion is manifested as a vertical ‘bouncing’ of the gas, potentially leading to shocks and heating, as observed in recent global numerical simulations. In this paper we isolate the mechanics of vertical disc oscillations by means of quasi-2D and fully 3D hydrodynamic local (shearing-box) models. To determine the numerical and physical dissipation mechanisms at work during an oscillation we start by investigating unforced oscillations, examining the effect of initial oscillation amplitude, as well as resolution, boundary conditions, and vertical box size on the dissipation and energetics of the oscillations. We then drive the oscillations by introducing a time-dependent gravitational potential. A key result is that even a purely vertically oscillating disc is (parametrically) unstable to developing inertial waves, as we confirm through a linear stability analysis. The most important of these has the character of a bending wave, whose radial wavelength depends on the frequency of the vertical oscillation. The nonlinear phase of the instability exhibits shocks, which dampen the oscillations, although energy can also flow from the bending wave back to the vertical oscillation.