This is not a joke...I kid you not!...it is a real technique used by sex therapists... simple and revealing.
Get your husband a roll of postage stamps and instruct him to stick a strip of stamps around his penis...making sure that they remain connected...prior to going to sleep. If the perforations are broken when he wakes than chances are good that he had a mid-night erection which would rule out a physical cause for his problem...much easier and cheaper than a bunch of elaborate tests.
If he breaks the stamps...unless he's also clinically depressed or on medication for Depression (both of which can cause a nose-dive in one's sex life), I'm with John on this one...somebody's keeping a secret!