Can I charge my phone/electricals onboard?

We have USB sockets / 12v sockets available for charging devices when at sea. When alongside in a marina, we also have use of 240v sockets (just like plugs at home).