Over-the-counter medications like ibuprofen and naproxen are effective in managing menstrual pain. These medications work by reducing the production of prostaglandins, thereby decreasing uterine contractions and pain. Always consult with a healthcare provider before starting any medication regimen.