When sailing, can the passengers of the yacht safely go swimming while in the open seas? That is, when some miles away from the coast-line.
Yes. My wife is a geologist and has been on a couple of research cruises in the south Pacific and Indian oceans. It used to be quite common to have a "swim call" when the seas were calm. The vessel would stop, and the crew and scientific staff would go for a swim. In one case a student lost her leg to a shark during a swim call on a NOAA ship. I believe that US Naval and Coast Guard ships will also hold "swim calls", and if you have a private ship, there is nobody to stop you. You can, after all, drown as easily in 10 feet of water as you can in 1 mile of water.
This isn't perfectly safe to swim in open-sea and should be organized. Some dangers - currents, stiffed legs, sea creatures, almost as on the beach and a wild beach could be really unsafe.
The main countermeasures are -
Still water and weather forecast, off course.
Shark or other problems proof nets in the water, also keep people inside in most cases.
Crew on board to organize rescue and deal with the vessel.
Boats on water, not oared or unstable themselves for get in the same trouble as rescued.
Medic, always a good idea.