First, a gas must be present.
Under geological conditions there are two major sources for gas production. Either the gas is produced thermocatalytically as a result of breakdown of organic carbon to oil and gas, or gas is produced bacteriologically by relatively shallow decomposition of organic matter.
The type of organic carbon deposited also plays a role here; terrestrial plants tend to have high wax and sulfur contents in order to retain water during their lifetimes and also to provide a rigid stem. Marine plants need neither of these conditions. Thus if bacterial action is on terrestrial plant debris then H2S, CO2, CH4 are dominantly produced, while if on marine vegetation then methane and carbon dioxide are the main gas products.
Second, once gas is produced, it must find a migration pathway from the source region to the geological regions favourable for hydrate formation.
Third, all gases are soluble in water to greater or lesser degrees with the solubilities being pressure and temperature sensitive plus also being dependent on what other gases, minerals, molecules, ions and compounds are dissolved in the water and on the concentrations of each such component. Thus there is an excruciatingly complex transport problem for gases in their journey to the sedimentary surface with geological time, and there is also a problem of whether the gaseous concentration of, say, methane will exceed the solubility limit and so appear as free-phase gas, which has its own transport and buoyancy characteristics that are different to those of gas in water solution.