I have always said that if you have a Watermaker and sufficient power then going ashore is only an option and not a necessity. These days, especially in catamarans, desalinators are becoming more common, as are generators to run all appliances.
Almost every bareboat around the world has a 12 volt cigarette lighter fitting at the navigation table which is perfect for powering mobile phones etc – some yachts also have 12 volt outlets is each cabin. More and more yachts have small inverters which can convert 12 volts to 220 volts. With some of these inverters built in and some have small stand-alone units that plug into the 12 volt plug and offer a 220/240 three pin on the other side.
The limitation of an inverter is that while it might cope with charging laptops and cameras, it will not with hair dryers or toasters which draw too much current. To run these high amp units you will either need to have a generator on board or be connected to shore power. In the Mediterranean most vessels now have shore power. Basically this is an extension lead plugging into the marina at one end and being wired to the navigation table and usually cabins. Shore power allows access to all 220/240 volt items as well as charging the 12 volt batteries aboard.
A generator can be started up to run high draw current items such as hair dryers and also charge the boat’s 12 volt batteries. Some operators are now recommending yachts run their engine 3 – 3 ½ hours per day to charge the batteries. This they say is to ensure that there is no possible chance that the fridge will not be as cool as possible and that they do not get any charging issues.
That amount of time sound excessive to me and if the gauges are correct, you would be happy to see anything above 11.8 volts and a cool fridge as a minimum before turning on the engine.