Does moaning make someone feel better?
When I ask if he is OK, he says yes. When I ask why is he moaning, he says it makes him feel better. It really upsets me because I think he is hurting or unwell.
It's hard to determine if someone moaning feels better; especially, without knowing anything more about your husband. So, I'll give you a real-life example with more details and you can decide if your situation is similar.
My late father who had Alzheimer's in his 80s used to hum at certain times. He repeatedly hummed the same few bars of a song I did not recognize.
After a while, I recorded when he hummed--what he was doing before and during. A pattern emerged. He hummed when he felt mildly flustered trying to do something or deal with someone. When he couldn't do something or when he couldn't express himself clearly enough for my husband or I to understand.
Other times, he'd hum (not as often, though) when he felt joyful...then he'd hum more bars of that song I did not know.
What I do know is, as our loved ones' brains decline in cognitive ability due to dementia, some are comforted by vocalizing. Whether this involves moaning or humming, the vocalizations serve a purpose--to hear one's own expression, to crowd out other thoughts or voices in one's mind, or to feel one's own company.
Again, it's hard to know why your husband moans without knowing more. So, keep asking him from time to time. And ask in different ways, just to be sure.
Also, perhaps sound and vibration have a calming and healthy affect on him, which I've read is how mantras and chants are beneficial to the body.
Music does some resonating in the body - especially the chest area. The moaning or humming may bring that resonation back to the forefront for the loved one.
I noticed this myself one time when listening to a Tongan choir since in a relatively small chapel (seated 200 maybe). As this choir sang, my entire ribcage was resonating with the music. Didn't matter whether they sang in English or Tongan. The vibrating in my ribcage was quite comforting. Big difference between recorded music and live music - their volume was at a comfortable level, the harmony and notes were quite beautiful.
Best wishes to all!