“Mass airflow sensor” is totally unrelated to the climate control system. Your experience was purely coincidence. Mass Airflow Sensor, often called the MAF sensor, is measuring the total amount of air being drawn through your air filter from the outside air. They contain within them a heating element and that does often go bad after 17 years on the road. I’m not familiar with your car, but most are really easy to access and change. It’ll be in the induction system just after the air filter box. Normally there’ll be two screws holding it on and an electrical plug. Since everything around it including its housing and the place the screws are screwed into are all plastic and there are no high torque values involved, there’s no corrosion to deal with or critical torque values. Just don’t overtighten the screws when you install the new one and strip the holes out.
Find it (try an internet search or a repair manual), try replacing it, and see what happens. If the code doesn’t clear within three or four days (some things have clear the ECU via a few repeated starts), you can return the new one for a refund and go forward.
Normally I never suggest trying a new part without actual diagnostic readings, but this one’s so simple to remove and replace and the symptoms so descriptive of normal failure of a 17 year old MAF sensor, that I’ll waive my normal self-discipline rules for myself.
NOTE: I think tester is right about the cause of the morning nonstarts. My suggestion is just for the code. If his suggestion works, you can always build the modus operandi into your morning start protocols until you feel compelled to actually get the problem fixed. I did that on an old truck once. Every morning I’d turn the key to ON for two or three 4-second moments before turning it to START. I never got around to actually fixing the problem…