Life as a British naval officer during the Age of Sail was tough. Ships were typically commissioned for three years and it would not be uncommon for a naval officer to spend that entire period of time aboard ship. A captain, after Lord St. Vincent assumed control of the navy, could not spend a night out of his ship without the written permission of his admiral.
Such a life had to be hard on families and the general consensus is that the service discouraged marriage until later in one’s career. Some famous officers never married, but is seem that most of those who married did so in their late 20s (Nelson married at 29) or early 30s.
Some admirals definitely disapproved of married officers. When St. Vincent, then only Vice Admiral Sir John Jervis, was assembling his expedition directed at French possessions in the West Indies in 1793 he received letters from officers whom had previously been rewarded by his patronage asking for positions in his ships. One unfortunate received this response:
You having thought fit to take to yourself a wife, are to look for no further attentions from
Your humble servant,