Yes, the CDC says adults can take an over-the-counter (OTC) pain reliever to treat post-vaccine discomfort, as long as it is safe for them to do so.
Talk with your doctor about OTC pain relievers like aspirin, ibuprofen (Advil/Motrin), and acetaminophen (Tylenol) to find out which ones are safe for you.