Yes, it's usually okay to take Midol while breastfeeding, but you need to know a few things. Midol contains acetaminophen, caffeine and an antihistamine named Pyrilamine.
Acetaminophen 1 and caffeine can enter your breast milk, but usually in small amounts that shouldn't harm your baby. However, excessive caffeine can lead to restlessness in your baby 2 , so be mindful of that.
Of course, be sure to consult with your healthcare provider. They can give you the best advice, based on your unique health circumstances.