When it comes to augmenting the Diesel fuel in our trucks, propane will work, natural gas will work, methane would work and yes, hydrogen gas could work ... assuming you had enough of it to do anything and didn't have to burn the diesel first to make the electricity to make the gas ...
Therein lies the rub. There's no free lunch.
Electrolysis is not a new concept. It takes more fuel to make the power needed to electrolyze the water into its constituent parts (hydrogen and oxygen) than can be generated by burning the resulting gases. Thats a fact --- and that means the only hope for the concept is to limit the production of the current to those times when the engine is decelerating or coasting. Or, you must make use of some otherwise wasted energy to create the electrical current ... like maybe driving the generator off the turbo or something.
Then, you must store the gas created at those times until such time as you want to burn it to provide motive power to the vehicle. Storing hydrogen and oxygen together isn't a good idea. When they were water, they were stable, once separated, they are explosive.
Assuming one could solve the problems of only generating the gases while going downhill or braking, and the problem of separating the gases until one wanted to use them, and create enough volume of the gases to do any good, it's a perfectly sound idea.
Unfortunately, none of the "home brew" hydrogen generators I've heard anything about do any of those things, so I have serious doubts as to any of the positive claims that are made about them.
If they really worked as claimed, and provided a net power gain, it would be pretty simple to demonstrate by simply putting the vehicle on a dyno, run it at a steady state with the gas generating device turned off, get a reading, engage the gas maker and see how the horsepower inceased, rpms climbed or torque output soared.
I think it's pretty telling that no one has done this.