Hello everyone,
I was reading your case and found it to be pretty unique. Please understand that I'm only a student and that I am not a licensed veterinarian, however I may be able to offer you some insight into this problem. There are a variety of disease conditions that may cause an animal to mouth gape. although I would need specific temperatures taken from the terrariums gradient extremes to help rule out environmental factors (in addition to humidity levels) at a time when the animal is exhibiting mouth gaping to help rule out environmental factors. It appears to me that you have quite an understaning of this and still your iguana seems to be mouth gaping at night during a time of decreased activity/rest when a veterinarian would least expect this symptom to occur in a healthy individual.
I would say the following list of presemptve causes may be possible! I would advise that you see a licensed veterinarian ASAP and follow the order of this list of differentials (or what your vet recommends first).
Infectious (bacteria, fungi, viruses (saurian herpes & adenovirus)) (MOST LIKELY CAUSE)
Heart disease
Non-infectious lung disease
or a space occupying mass such as a tumor
although less likely, I would still keep neurological disturbances on the list of possibilities (differentials) given that central tumors in the brain can affect the cardiac and respiratory centers of the brain stem.
although unlikely, renal failure may also present in this fashion due to the toxic effects of systemic ammonia buildup
Anyways I hope this helps! please don't wait to see a vet! Mouth gaping is a progressed clinical sign in reptiles! Good luck