It is written into halacha that we are not allowed to assist captives to escape, lest we encourage captors to be harsher with their victims, and watch them more closely. See SA YD 252:5 for example.
It does not say that captives are not allowed to attempt their own escape, although the svara written there may still apply.
So are captives allowed to attempt escape or not?