Causes of cramps?

Am

Earliert today I had some cramping/ sharp pain down my right side and some pain on the left side of my stomach. I called my dr because I didn't feel baby move all day. They suggested labor and delivery to rule out contractions. Theyre saying the pain could be from not eating enough or muscle pain ( i dont think its that as Ive had muscle pain before)

Could they be a reason? Part of me is questioning it feeling as though its something else.

Babys heartbeat it good and they did a sonogram and she looks good.