Thank you for sharing your dream with us. Please take everything that I share to the Holy Spirit as He Alone gives the accurate interpretation. This dream could be interpreted literally (i.e., only if your husband has been in jail or there’s a possibility of him going to jail) or metaphorically/spiritually. I’ll focus on the metaphorical/spiritual interpretation.
Your husband is/was “bound” (could be an addiction or something else, but definitely something that might be hidden from you) by something and as a result there was legal ground for the enemy to attack him. The following scripture Matthew 18:34 comes to mind in this context. It appears that there has been a change in his heart (perhaps repentance), God needs to work on him (surgery and hospital) and after that he is not bound. He may be tempted to go back to whatever it was that bound him but will not be tempted. Please pray for his complete deliverance and your support (query prayer) was/is key in turning things around.