You could be suffering from cough variant asthma
and trigger could be as you have said the stale water in your portable ac. There must be moulds and spores of these moulds may have triggered the attack. You should take inhalers like asthalin
. montair tablet and if required, a short course of oral steroids
. Frequently change your bed linen and sun your matress and pillow frequently.Your room should also have fresh air ventilation.