Me and DP will do this sometimes. She gets migraines, and migraine tablets fix them but leave her with a "fizzy" feeling behind her eyes that stops her sleeping.
An orgasm seems to help with this, but it needs to be a "low effort" one, which means masturbation. (I get what she means with this, it takes more effort mentally to orgasm from a hand job, than masturbation, even though I'm doing less work with a hand job)
Sometimes DP wants to be alone, but others she wants me there, with my arm round her, or stroking her back or other areas.
Is it as much fun for me as sex? Of course not, but sex isn't happening that night anyway, and it's nice to feel close to her. Sometimes I'll masturbate alongside her, but not always.
Maybe that's what your husband was looking for @Stella45 , and just communicated it badly.