All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
There are eight categories of people entitled to receive Zakah. This is attested to in the following verse: "The alms are only for the poor and the needy, and those who collect them, and those whose hearts are to be reconciled, and to free the captives and the debtors, and for the cause of Allah, and (for) the wayfarer; a duty imposed by Allah. Allah is Knower, Wise." {At-Tawbah, 60}. In addition, narrated Ziyad ibn al-Harith as-Suda'i:
I came to the Messenger of Allah (PBUH) and swore allegiance to him, and after telling a long story he said: Then a man came to him and said: Give me some of the sadaqah (alms). The Messenger of Allah (PBUH) said (What means): Allah is not pleased with a Prophet's or anyone else's decision about Sadaqat till He has given a decision about them Himself. He has divided those entitled to them into eight categories, so if you come within those categories, I shall give you what you desire. {Related by Abu Dawud}. As clear from the aforementioned evidences, "debtors" refers to those who are so overburdened with debts that they can`t pay them off. Thus, it is permissible to give Zakah to the prisoners who can`t pay off their already due debts. It is also permissible to give them, from Zakah, whatever amount suffices for their food, clothing and lodging. These debtors come in three categories:
Al-Shirbini (May Allah be pleased with him) said: "It is permissible to give Zakah to the person who was indebted for a lawful matter, such Hajj, Jihad, marriage, food and the like." {Moghni Al-Mohtaj, V.4:P.179}. The same ruling applies to the one indebted involuntarily. For example, he broke something and it was damaged.
On the other hand, it is impermissible to give Zakah to the person who was indebted for an unlawful matter, such as the one who bought wine or spent wastefully.
In conclusion, if these prisoners were indebted for a lawful matter and couldn`t afford to settle their debts, then it is permissible to give them from the Zakah as they come within the category of "Debtors". And Allah the Almighty knows best.