Methanogens are microorganisms that make methane as a metabolic byproduct in anoxic conditions. The organisms are archaea, a different domain from bacteria. They are common in wetlands, where they make marsh gas.
In marine sediments methane is produced when sulfates are low. This happens below the top layers. Methanogenic archaea populations play an important role in anaerobic wastewater treatments. Some methanogens are extremophiles, found in environments such as hot springs and submarine hydrothermal vents as well as in the "solid" rock of the Earth's crust, kilometers below the surface.
Methanogen Facts for Kids. Kiddle Encyclopedia.