Refueling at sea implies to me that you are underway. This introduces a few complications.
1. Water in the fuel: If it is rough enough you'll get a lot of saltwater along with your fuel. With ethanol-crapgas this will make a mess not fixable by the water seperator.
2. Spillage: If it is rough, gas will go other places besides the tank.
3. Wind Direction: Typically the fuel fill is near the stern. Wind from aft will blow gas fumes into the cabin
In this case a course change is best or at least shut the hatches.
4. Engine running: If all is well the engine can be running, but you have no margin at all for finding leaks or fumes before they are a real danger.
Refueling while anchored is a best case. You are into the wind and not underway.