Please don't worry. You won't get in trouble and you certainly won't go to prison. The important thing, as other posters have said, is to inform them now as soon as you can, and put your mind at rest.
The Shelter link
@999tigger gave you is very good. I'd echo their advice to amend the template letter it gives. I'd also recommend looking up the contact details of your local authority's housing benefit office, as described on the link, and using the email address if there is one. It can be the fastest and easiest way of communicating with them.
What will happen next is that your housing benefit will be recalculated. You will probably then receive less housing benefit going forward, and will have to increase your contribution to your supported accommodation. You will likely be deemed to have an
overpayment, i.e. an amount of money that has been paid to your supported accommodation by housing benefit between the date of your change of circumstances and the date of the recalculation, which should instead have been paid by you according to the recalculation. This should all be laid out very clearly in a letter.
You will have to pay back the overpayment amount, but can do so slowly and affordably. Please don't worry about any lasting effects of this - there aren't any. Overpayments are common, and not a big deal. Most likely, they will deduct some money from your ongoing HB as described here in §4.60.
https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/696191/hbopg-part-4-recovery-of-overpayments.pdfThe letter you will receive should again clearly describe the resulting amount you will have to pay to your supported accommodation, taking into account the recalculation and the deduction for the overpayment. The maximum they should deduct is £10.95 per week as described in §4.260, and if they initially suggest more you can contact them and ask them to reduce it to this.