It is generally safe to drink the water from a hot water heater, but it’s a matter of some debate. If your tank is old, or hasn’t been flushed in a while, it may be full of sediment that can make its way to your faucet.
As well, hot water is more likely to leach minerals (like copper) from the pipes as it travels through your home. The risk is higher in large buildings with extensive plumbing systems, like condos or apartments. Though such minerals aren’t harmful in small doses, they can give the water an off taste.
It’s best to use cold water for drinking or cooking instead.