If I know the ride will be long, I'll take a 2 Tylenol and 3 Advil before we leave. That gives them time to work before I start to get sore. Also, not sure what you're riding and what options you have for your legs, but the ability to re-position them makes a huge difference. I'm only 5'9" with 33" inseam but having highway bars/boards is an essential for me. I spend more time with my feet on the forward position than on the pegs. My small boards allow me to have my knees slightly bent, or I can straighten my legs and the boards catch my feet between the heel and the ankle. I've done a few 5-600 mile days this way without any knee discomfort.
I too would endorse SCB's suggestion of some cruiser pegs or boards, they make all the difference on a longer ride. I use mine a lot on rides and it relieves all sorts of pains, not only of the knees. :claps::claps:
It partly depends on what is causing the pain. For me it is hip pain from arthritis, the only help is Aleve 2 times a day while on a trip but even that is not a guarantee. Also keeping them moving as often as practical helps so taking breaks and walking around and doing some stretches helps. I have Mik-O-Pegs which allow me to let my feet down and straighten my legs, they help a lot.
I dropped the Valk in March of 2012 and fractured my right femur. Then I continued to walk/ride on it for weeks before I knew it was broken.
I have to to tell you this has been a long and painful recovery. I am only now beginning to leave the cane at home. Above and beyond just doping the pain... one of the things that has really helped me is a knee brace.
I have a Knapp and while it is not always necessary it does tend to help while I am out riding. It seems to keep things "aligned" properly and that aids in controlling my pain. I also kinda like it when the hinges squeak... makes me feel like Mad Max.
I also take an ice pack bag with me... so if I am holed up in a motel or a friends place I can "ice that knee." I use a leg I hacked out of the wife's pantyhose like a sock to hold the thing in place. This has also really helped in my recovery. A bit of preventative maintenance in the evenings really pays off the following day.
I didn't read what is causing your knee pain, but since I have bone on bone joint, where the cushioning cartilage has disintegrated, I finally on the advice of my orthopedic surgeon got the 'arthrovisc ' shots.. it has been about 3 weeks and I am relatively comfortable. It is injectible ' synthetic synovial fluid', that gels to cushion the joint. Google it and see if that would work for you. Not cheap but far better than the naproxen on your liver etc.