Balancing rest and exercise
During the first 24 to 48 hours after your knee problem has started, you could:

rest your knee, but avoid having long periods where you don’t move at all
when you are awake, move your knee gently for 10 to 20 seconds every hour.
After 48 hours:

Try to use your leg more, as exercise can help with long-term pain.
When going upstairs, lead with your good leg. Use the handrail, if there is one.
When going downstairs, lead with your sore leg. Use the handrail, if there is one.
Try to stick to your normal routine, if you can, as this can help your recovery. This includes staying at, or returning to, work.
Avoid heavy lifting until your pain has gone down and you have good range of movement in your knee.

Low-impact exercise, such as cycling and swimming, can be useful when recovering from a knee injury.