Ding hit the nail right on the head: Practice!!!
Capsizing and swiiming near your boat are probably the last things anyone wants to do with their sailing time, but there is probably nothing more valuable.
Mike
Luckily I'm the mf-ing master of capsizing.