Helicity plays an important role in spectacular geophysical phenomena such as hurricanes or the generation of the terrestrial magnetic field. The present investigation shows how helicity can be created in a statistically homogeneous but anisotropic flow, driven by buoyancy. If the flow is close enough to a two-dimensional limit, spontaneous symmetry breaking leads to the generation of mean helicity. In particular, we explain these observations by identifying a simple linear mechanism, the relevance of which is illustrated by simulations of unstably stratified turbulence in a conducting fluid on which a magnetic field is imposed. Finally it is shown that the self-organized state displays dynamical reversals of the sign of the mean helicity.