The answer to 'how to clean water heater' is to flush the tank and remove sediment buildup regularly. This helps maintain the efficiency and lifespan of your water heater. The recommended frequency is to flush the tank once a year, or more often if you have hard water or notice the water heating slower.
To flush the tank, first turn off power to the water heater and let the tank cool down. Then connect a garden hose to the drain valve at the bottom of the tank and run the water until it runs clear, which may take several minutes. This will remove any sediment that has accumulated at the bottom of the tank. When finished, turn the power back on and let the tank refill.