Spontaneous generation of density perturbations in the early Universe