Methylmercury formation is mainly a microbially mediated process occurring in water bodies such as wetlands and estuaries where anoxic zones rich in organic carbon are advantageous for the kind of microbes responsible for mercury methylation.
But first, it is useful to picture the biogeochemical zonation of the sediments in an aquatic system, as this zones determine the best electron acceptor available for heterotrophic metabolism and translates directly to the formation of methylmercury.
For an oxygen rich water column and enough biodegradable organic carbon, aerobic organisms populate the first layers of sediments where oxygen is still present. If nitrate is present in the system, denitrifiers dominate a little deeper where oxygen starts lacking, followed by manganese and iron reducers. Sulfate-reducers and methanogens are found where other electron acceptors are no longer available but there is still organic carbon to be consumed. This order just obeys the thermodynamics of oxidizing the organic carbon, for instance, much more energy can be gained using oxygen as opposed to sulfate.
It is in these deep anoxic zones where the inorganic mercury deposited from the water column enters the realms of sulfate-reducing bacteria, iron-reducing bacteria and methanogens, which uptake the metal in their metabolims and end up releasing it as methylmercury CH3Hg+ [1].
Only a few microorganisms species are capable of mercury methylation and mercury is still toxic for those cells! The whole pathway for inorganic mercury becoming methylmercury is not completely understood, but broadly speaking, we can say that mercury in the system sneaks in the cells via active transport (like against diffusion) and is transformed by some enzyme-catalyzed process into MeHg which is then exported outside the cell.