Genesis has it right.
It's all about dew point and making sure the air inside the housing never drops to a temperature that equals the dewpoint.
If you open your housing on the boat in the morning to load your camera, the humidity is likely very high, and the dewpoint is just a few degrees below the ambient air temp. When you close the housing, you trap this air in it, then take it down underwater where the temp is cooler. The trapped air cools to the dew-point.... fog!
To avoid this, the best rule of thumb is to never open the housing on the boat unless your inside an air-conditioned cabin. If you must open it outside, carefully try to fill the housing with dry SCUBA air before closing it, like Genesis suggested. Forget desiccants, maxi-pads, and mask defog. Those are band-aids and your are still exposing your camera to moisture which isn't good.
I once got into a bit of an argument with a guy on a live-aboard. This person believed he was a very experienced u/w photographer. He had an expensive housed SLR. He saw me loading my film and housing in the a/c cabin and said "You shouldn't do that in here, you'll get condensation inside your housing when you dive." I politely explained how that wasn't quite right. He didn't buy it and laughed at me.
Apparently, this guy failed high school physics. He was out in the moist salt-air with his N90 and assortment of Nikon AF lenses strewn about the deck. That was a couple of years ago. I'm betting his lenses have mold in them by now. Hopefully some poor sap on Ebay doesn't end up with them.
Regards,
Brian