R.J.
Of COURSE it's okay to give either tylenol or ibuprofen before bed. It's okay to give prophylactically, much less when you already know somethingis wrong.
Babies are lucky, their nerves aren't wired completely, so they don't feel pain the same way / a lot gets lost in transmission. But take it from someone who cut a tooth as an adult: Go get a steak knife and slice your gums. That's how it feels to cut a tooth.