well it could have just been a muscle stiffness
but other causes need to be ruled out,
other causes include - gastritis, pancreatitis
, gall stones
, enlarged spleen,ecg
these need to be ruled out to confirm whether it is just a muscle spasm and nothing else.
the way you are explaining the pain seems referred pain
from the abdomen. so above causes mentioned need to be ruled out.
suggest get a check up done by a physician.