We introduce a scheme for the calculation of nonresonant hyper-Raman spectra of vitreous materials within a density-functional formulation. Hyper-Raman tensors are obtained through the application of finite electric fields and explicitly account for the nonlinear modulation of the dielectric susceptibility by longitudinal vibrational modes. We apply our scheme to a model of vitreous silica in various scattering geometries and polarization conditions, finding good agreement with experiment. The calculated spectra are analyzed both in terms of transverse and longitudinal modes and in terms of underlying atomic vibrations.