TCTM04119 | Income: Employment income rules: Payments made to a person serving a custodial sentence or remanded in custody awaiting trial or sentence, for work done while serving the sentence or remanded in custody
From HM Revenue & Customs · Tax Credits Technical Manual
The Tax Credits (Definition and Calculation of Income) Regulations 2002, Reg. 4(1)(m)
This refers to payments made to people who are serving a custodial sentence or who are remanded in custody for the work they actually do whilst they are serving their custodial sentence or remanded in custody.