I have a hard time going back to sleep as well when something wakes me up. Very frustrating and leads to a long day the next day. Does this happen a lot for you? I think you should talk to your doctor. Gerd can cause you to wake up with stomach pain at night so you perhaps need a med change but other things can too like gallbladder issues. https://www.medicalnewstoday.com/articles/317690.php. Do you eat before bed?
But you are saying spasm. You don't mention your age. If you are middle age, you should see a doctor to discuss this. Believe it or not, an issue from the heart can radiate pain/spasm to that area. You just want to rule it out. It probably isn't, but better safe than sorry.
A more likely cause though is dehydration. Night spasms can be directly related to dehydration. Do you get enough fluids during the day?