From reading the delightful historical fiction novels of Forrester and O'Brian I've noticed the naval officers (Midshipmen, Lieutenants, and even Captains) regularly lead raids into enemy territory as well as cutting-out and boarding operations. How did these officers maintain the level of physical fitness necessary to accomplish these tasks? It seems they did not do manual labour like the enlisted men - did they exercise instead?
It really depends on the Officer, Commanders like Pellew would run the ropes and help bring in the sails with his men. He usually didn't holystone the decks but he defiantly love to climb the rigging. Pellew also tended to have junior officers that operated similar to himself like Jeremiah Coghlan. Not to say he didn't have the children of his friends with him who did absolutely nothing.
Pellew is one of the Commanders who Aubry is biased off of and i think he is Hornblower's Commanding officer. I literally just finished this book yesterday if your interested learning more
Commander: The Life and Exploits of Britain's Greatest Frigate Captain ISBN-10: 9780393071641
edit: added the book