I'm doing this myself now. I have a homelab server setup and a hybrid water heater.
Stuffed the homelab next to the air intake of the water heater, now when I need hot water my water heater sucks the heat out of the air and puts it into the water.
It's obviously not 100% efficient, but at least it recaptures some of the waste heat and decreases my electrical bill somewhat.