Generally, I flake my headsails and I roll them as tightly and cleanly as possible, starting at the clew while the hanks are still on the forestay, then I undo the hanks and tie the roll with a sail tie before carrying it back to the cockpit
. I keep the sail there for some time, for the water
to drip out of it.
On my boat, this works at least up to sea state 4 (moderate) and Beaufort
6, going to windward. Of course, it will be different on a smaller boat (livelier motions) or a bigger one (larger sails).