Rodgers, William Ledyard, vice admiral, USN, ret. Greek and Roman Naval Warfare. A Study of Strategy, Tactics, and Ship Design from Salamis (480 BC) to Actium (31 BC) (1934, 1964)
Gardiner, Robert, ed. Earliest Ships, The: The Evolution of Boats into Ships (1996)
Warry, John. Warfare in the Classical World: An Illustrated Encyclopedia of Weapons, Warriors & Warfare in the Ancient Civilisations of Greece and Rome (1980) (Good for the beginner.)
In Classical, Hellenistic, and Imperial navies, rowers were free men. They were not chained, and fought against boarding actions when necessary. The exception was in Greece, when slave-owners might send some of their slaves to the navy in time of war, but they were treated same as the free men, including being paid by the day. One way to earn money to buy your freedom!
So the scenes in Ben Hur are just bad history. It would make sense set in a Venetian galley 1400 years later.
It's by the Late Medieval/Renaissance that being sentenced to the galleys becomes a terrifying punishment handed out by countries with Mediterranean shores. At that time, the criminals are chained to the benches (cheap iron, just part of the galley's fittings), live, sleep, eat, and shit there, probably for a short life. You could smell a galley or galleasse passing upwind, and they were limited in where in a harbor they could dock or anchor because of this. They stank with their slaves. Does the galley slave die of sores? No one cares. He's disposable and supposed to die a slow horrible death. Slaves rowed well in battle to save their own lives, because if the ship sank, they sank with it. No one released them for just that reason.
As mentioned above, depending on the ship's duty they might be released in port to be used for re-loading or grueling duties ashore (still chained).
Adm. Rogers again: Naval Warfare Under Oars, 4th to 16th Centuries. A Study of Strategy, Tactics and Ship Design (1940, 1967) His information on viking ships is weak; his longbow ballistics stink (because he's basing them on early 20th C American amateur competitions), but he'll give you everything on galleys and galleasses.