A method for generating power comprising the steps of feeding water into an electrolyzer, providing electricity to operate the electrolyzer to split at least some of the water into hydrogen and oxygen, and decompressing one or both of the hydrogen and oxygen to generate power. Water can be pressurized prior to being fed into the electrolyzer. The hydrogen and oxygen, which can be stored in insulated storage vessels, can be decompressed isentropically to yield energy, which can be used to power a generator. Heat can be extracted from the hydrogen and oxygen, such as through heat exchangers. Hydrogen and oxygen can combine in an internal combustion process to produce work and heat, which can be recycled into the thermodynamic process.