Many interesting phenomena have been observed in layers of granular materials subjected to vertical oscillations; these include the formation of a variety of standing wave patterns, and the occurrence of isolated features called oscillons, which alternately form conical heaps and craters oscillating at one-half of the forcing frequency. No continuum-based explanation of these phenomena has previously been proposed. We apply a continuum theory, termed the double-shearing theory, which has had success in analyzing various problems in the flow of granular materials, to the problem of a layer of granular material on a vertically vibrating rigid base undergoing vertical oscillations in plane strain. There exists a trivial solution in which the layer moves as a rigid body. By investigating linear perturbations of this solution, we find that at certain amplitudes and frequencies this trivial solution can bifurcate. The time dependence of the perturbed solution is governed by Mathieu’s equation, which allows stable, unstable and periodic solutions, and the observed period-doubling behaviour. Several solutions for the spatial velocity distribution are obtained; these include one in which the surface undergoes vertical velocities that have sinusoidal dependence on the horizontal space dimension, which corresponds to the formation of striped standing waves, and is one of the observed patterns. An alternative continuum theory of granular material mechanics, in which the principal axes of stress and rate-of-deformation are coincident, is shown to be incapable of giving rise to similar instabilities.