We show that an inhomogeneous cosmological lepton number may have produced turbulence in the primordial plasma when neutrinos entered the (almost) free-streaming regime. This effect may be responsible for the origin of cosmic magnetic fields and give rise to a detectable background of gravitational waves. An existence of inhomogeneous lepton asymmetry could be naturally generated by active-sterile neutrino oscillations or by some versions of the Affleck-Dine baryogenesis scenario.