Ibuprofen (and other NSAIDs) probably are the most effective OTCs, but too much too often can cause stomach problems. Tylenol, on the other hand, is probably safer, just never did a damn thing for me pain-wise. Tough on on the liver, though, f you exceed rec dosage.
Wouldn't recommend prescription painkillers for any gym-related pain; end up causing WAY more problems than they fix. They work TOO well is where the trouble usually starts.