Hey there:
I recently had a giant issue where my wife was masturbating while we were both in bed. At first she insisted I was making it up or imagining it... She said she would never do something like that and at first I didn't believe her. However she was absolutely insistent that she wasn't doing it... but she WAS!
Thats how I found this board. I was looking for help and feedback.
Anyway, I was Googling around and I found out about something called "SBS" a.k.a. Sleepsex. Its like Sleepwalking, not very many people do it, but it happens. The person doing it is asleep and isn't aware they are doing it and they won't remember it the next day.
For some people who have it it is light self-touching (like my wife), others full on Masturbation... for some people they actually have sex with their partners. Often their partners say they are "not like themselves" in that they are more/less aggressive or do / don't do things that they normally would during sex.
I talked to a friend of mine and apparently his wife has always done it. For my wife it is a new thing. If it is new, it can be brought on by stress, life changes, drugs/alcohol or other stressors.
All you can do is talk to him about it and let him know you aren't offended by it and you don't take it personally. If you are offended and you DO take it personally, work it out and get over it. He can't help it... like sleepwalking. Find out if he's under any new stress or maybe going through a midlife crisis or if something else is going on and then help him through it.
For my wife it was a stressful pregnancy. She doesn't do it anymore.
I wouldn't recommend the "tie his pants" approach. I would think it would result in anger and frustration, even when he's asleep. At best I think he would just try and do it "through" the pants and end up with friction burns.
Hope this helps.
Ouroborous