How to get my boyfriend comfortable with having sex again?

Didn't really get any advice in the last group so wanted to try this one.

My boyfriend has been going through a lot lately. A terrible person who caused him trauma is back in his life and sadly now working at his job. I did finally convince him to find another job because it's not worth what this is doing to him. He started wetting the bed and one night had a nightmare and panic attack so bad when I woke him up he started vomiting on the side of the bed. Our sex life wasn't exactly effected by all of this. Of course if he said he wasn't up to it I understood. He did however completely stop having sex with me when he started wearing adult diapers to bed to help with him wetting the bed and keeping the bed dry. Not only does he not have sex with me anymore, he used to always sleep in his boxers because he hated wearing pajamas to bed and now he sleeps with sweet pants on and won't even cuddle me anymore 🥺. I have told him I'm not mad at him for wetting the bed and how strong of a person he is. It takes a lot to get out of bed and go face such an awful person everyday at your job. This isn't even really just about sex. He doesn't seem comfortable around me at all now. Like he's completely ashamed of himself. I understand trauma can mess up a sex drive, but he didn't start stopping sex and sleeping with sweat pants until he started using adult diapers so I think this stems from embarrassment.

He is in therapy