The surface of marshes, swamps, and bogs is initially porous vegetation that rots to form a crust that prevents oxygen from reaching the organic material trapped below. That is the condition that allows anaerobic digestion and fermentation of any plant or animal material which incidentally also produces methane.