This would not work. Reason: Thermodynamics
The reason that organisms undergo aerobic respiration is to oxidize fuel which gives off energy. The energy released is mostly due to the energy given off in the formation of water from the oxygen from the air and the hydrogen in the fuel. However, if energy has to be spent to break the bonds through electrolysis, then the respiration is no longer going to be a net source of energy for the organism.