In addition to these medications, magnesium sulfate may help stop some asthma attacks. Magnesium isn’t a recommended first-line treatment for asthma. But if you use it with other medications ...