Environmental concerns and emission reduction targets are driving a transition from fossil fuel to renewable-based electricity generation. However, intermittent and distributed renewable generation brings challenges for the grid operation, as the low voltage distribution grid increasingly becomes constrained during high residential solar PV generation. The electrification of water heating presents a large opportunity to address this challenge by intelligently responding to electrical network conditions. Smart water heaters with thermal storage can soak up excess PV as a thermal battery, which facilitates maximum renewable generation and solves local grid problems. However, the centralized operation of electricity markets tends to impede the benefits of the localized distributed energy resources (DER). In such a scenario, peer-to-peer (P2P) energy trading allows neighbouring prosumers to trade energy between themselves with minimum interference from electricity grid operators. This research develops a P2P energy trading framework, using advanced, multi-zone electric storage water heaters with autonomous and aggregated control. The financial benefits identified in this research are forthcoming due to new participation in the electricity market ancillary services, demand management and P2P energy trading. Simulated results have identified that up to 92% of household water heating energy can originate from their own rooftop PV. At the electricity grid level, P2P energy trading demonstrates an increase in the aggregated PV self-consumption from 39% to 83%, importantly allowing the remaining 17% to target grid support in periods of supply shortfall. Average retail consumer energy savings of AUD$369/annum are identified, which include 17% of savings that are attributed to P2P energy transactions, delivering a capital payback of <3 years.