In most cases, over-the-counter pain relievers like ibuprofen or acetaminophen can help manage the discomfort associated with cramps and spasms. However, it is crucial to consult a healthcare provider before administering any medication, especially in children.