Hold a long, deep breath in as long as you can

Now, don't asphyxiate yourself, LOL! Take a few deep breaths, then hold the last one in for a while. Use the compression of the air in your lungs to push downward on your diaphragm. If it doesn't work the first time, try it several more. The idea is to stretch your diaphragm in order to prevent the spasms.