It is implied that these are people that Yahweh has rescued. Alternate translation: "Yahweh also rescued people who sat" (See: [[rc://en/ta/man/translate/figs-explicit]])
Both "darkness" and "gloom" have basically the same meaning and are used to emphasize how dark the prison was. Alternate translation: "in complete darkness" (See: [[rc://en/ta/man/translate/figs-doublet]])