This article presents an innovative system for recovering thermal energy using a thermoelectric generator (TEG). The system uses waste heat from a water heater to generate electricity. A maximum temperature gradient of 96.5°C is maintained between the hot surface of the water heater and a heat sink, which is a cold-water cavity cooling the TEG to maintain a good temperature differential. The system produces about 350% more energy than the water heater consumes. The electricity generated is regulated by a DC-DC converter and stored in a Li-ion battery, ensuring stable operation even after the water heater has been shut down. This technology reduces energy costs and improves the efficiency of heating systems by recovering lost energy, while reducing external energy dependence of the water heater.