I wrote this up for my players in the Pathfinder 'Flashpoint Campaign' so that they'd have a good understanding of how three of the primary navies treat their prisoners of war. Obviously not every Navy in the Inner Sea is as 'civilised' as these three as some will ransom off, enslave, or even kill even the officer class. The Andoren try to treat all captured naval personnel relatively well while the Chelish generally reserve better treatment for the officers (although even they will treat captured enemy sailors better than their own prisoners).
Basically, the details are pretty similar to the rules set out during the Napoleanic War. See below.
For the naval officers and the nobility, there is no need for armed guards or barbed wire after you have gained their contractual surrender. Such individuals must not attempt to leave the assigned area, which must be at least 200 feet square per officer, up to a minimum distance of 1000 feet per twenty officers. As commissioned officers, they are to be paid a gold piece a week and may spend such gold where they will. They must not be put to work though may volunteer to do work for free or at a price.
Details of their capture must be tendered on a Messenger Ship of Innocence, which flies the white flag, and carries no armament, or in some other fashion, to the Admiralty of the country of the official’s standing so that it can be known.
They must not be injured by intent or negligence and any injuries must be tended by any available medical personnel. Treatment must also be provided, as well as can be given, for any disease or other infection, or poison, or such other malady as might be gained by the prisoner.
They must not be kept in solitary confinement.
They must be fed and watered, and given shelter, as best befits their station, according to that which can feasibly be provided. They are not to be tortured, physically or psychologically, nor are they to be interrogated (as defined by an absence of food or sleep; or repetitive and intimidating questions), though general inquiries and conversations may be had so long as they are polite and with recourse for the officer to redraw from conversation.
Officers may be traded to the country of their official standing, in exchange for anything that has been contractually agreed upon, between those two countries. In terms of conditional or unconditional surrender, and times of peace, all prisoners of war who have not lost status due to the aforementioned crimes are to be released to the countries of which they gained their official standing.
If the officer were to stray or break the laws of the realm, of which they have been informed, then they are to lose their status as an officer and be treated as any generic prisoner of war may. If the officer were to commit sabotage and attempt any damage of infrastructure, or attempt to subvert those who are in service to the officers or the military, or attempt to collude with those who are subverting such individuals, then they are to lose their status as an officer and be treated as any generic prisoner of war may.