We oversimplified slightly in the text above. Even after oxygen is used up burning dead plants in mud beneath an ocean or lake, a little more burning may occur as bacteria use other chemicals in place of oxygen. For example, bacteria may use the sulfate in sea water. The reaction can be written this way:
Sulfuric acid + plant → hydrogen sulfide + carbon dioxide + water + energy
H2SO4+ 2CH2O → H2S + 2CO2 + 2H2O + energy
In reality, the sulfate (SO4-2) will also be reacting with other things in the ocean, but this isn't too far off. Hydrogen sulfide (H2S) is the source of “rotten egg smell”. It also readily reacts with iron in mud to make iron sulfide minerals, which initially appear black in the mud but which later may recrystallize to beautiful fools-gold pyrite if they have enough time and a bit of heat and other help. You might have seen this if you have visited a salt marsh. The mud in the shallowest parts of salt marshes is often black just below the surface, and releases rotten-egg smell if stirred up, because the marsh is growing lots of plants, the mud has little oxygen, and bacteria are using sulfate to burn the organic matter.
As mud is deposited at the bottom of lakes, the sea floor and elsewhere, it buries older mud with its organic matter. If you dig a hole, the material farther down was deposited longer ago, and has had more time to run out of oxygen and the other chemicals that are used to burn dead plants. One often sees a sequence going down in the mud in which, at the top, oxygen is used to burn organic matter, and then nitrate, manganese oxides, iron oxides, and then sulfate. If organic matter still remains, the next step is for bacteria to produce methane, CH4, which is the main component of natural gas.
Something really interesting may happen next. At the pressures and temperatures we commonly see under water, methane is usually a gas, although at high pressure it can be liquefied for storage or shipping. But, if the pressure is high enough, the temperature low enough, and there is lots of water around, instead of making bubbles, the gas will combine with the water to make a special kind of ice. This ice is often called methane hydrate or methane clathrate. When samples are brought to the surface, are brought to the surface, they actually will burn (see figures below).
There is a lot of clathrate under the sea floor in many places, and more in the Arctic in permafrost. (Yes, we know that we told you that warmer conditions favor burial of plants without burning, but this burial can happen in cold places as well, and freezing may actually help it happen by keeping worms and other creatures from eating dead plants before they are buried in mud. The frozen soils of the Arctic are rich in dead plants, and much methane is produced from them where thawing occurs without much oxygen.)
As mud is buried deeper and deeper by more sediment, the Earth's heat warms it up. At some depth, the ice melts to release bubbles of methane. When this process was first discovered, some scientists were worried that undersea landslides or other accidents might release giant methane belches that would sink ships (if a huge bubble rose right where a ship was, the ship could fall into the bubble), and change the climate, and cause other problems.
Additional research has reduced these worries, although they haven't gone away entirely. It is still just possible that a bubble might endanger a boat in certain special conditions, but we are fairly confident that huge amounts of gas can't come out really rapidly. As the clathrate is buried by more sediment, trapping the Earth's heat, the deepest ice melts to make bubbles. But, making those bubbles requires pushing water out of the way, which requires that the gas have high pressure. Pushing more water away needs higher pressure. At some high enough pressure, the gas will fracture the icy layer above and bubble out gradually, before enough gas can build up to make a climate-changing belch. Also, as clathrate forms, it uses the water but not the salt in sea water, and that salt may build up in water remaining in mud nearby, lowering the melting point so that some water doesn't freeze even if a lot of methane is supplied, allowing gas to move up through unfrozen regions to leak out at the sea floor.
As we will discuss about climate change next chapter, methane in the sea floor may be very important for amplifying warming over decades and centuries, as warmer conditions melt the ice and let methane escape to increase the greenhouse warming. But, conduction of heat through the sediments to cause melting is rather slow, so we don't think that giant methane belches will change the climate even faster than that.