People who don't do exercise are more prone to get knee problem. Here are some knee pain solution that will help you a lot:

Don't rest too much, it can weakens your muscle.
Cardio exercises strengthen the muscles that support your knee and increase flexibility.
Lose weight it will lower the pressure on your knee.
Cushioned insoles shoes can reduce stress on your knees.