Bronchospasm can be caused due to swelling or irritation of the airways. An episode of bronchospasm generally subsides within 7-14 days. A doctor generally prescribes medicines to clear the airways and prevent wheezing.