Extremely light spoilers for The Martian
If you've read The Martian (or even if you haven't) you probably know that a water machine is just one of the sciencey contraptions Mark Watney has up his sleeve. It probably won't surprise you to learn that yes, the science checks out, and made and Earth version to prove it.
(Jump ahead to a minute in to skip all the scene-setting)
The slight difference here is that Mist8k just used some plain old hydrogen, whereas Watney used hydrazine—literal rocket fuel—which is a little bit harder to come by. So should you find yourself stranded on an alien planet, rest assured this One Weird Trick will work, just try not to get yourself blown up.