If I know for certain that she is in pain, I give the med and then soothe her back to sleep with pat/shh or some extra cuddles. One thing that works well, for me, with reagard to the teething pain, is to put some gel on her gums after I give the pain meds. It doesn't work well during the day but it seems to quickly take the edge off so that she can relax enough to fall back asleep.
If she has a cold or some other illness I just soothe her anyway I can while *trying* to avoid accidental parenting. I wouldn't feed to sleep but I may cuddle, stay there in her room, rub her back etc...until she could relax.
Hope that helps.
Myia