Pressing on your knees will relieve some of the stress on your muscles, giving you additional endurance on a climb, but it puts unnatural stress on the joint.
Without going too deep into the specifics of the anatomy, you have four muscles in your "quad" that attach to your patella, which is attached to your tibia (shin) via the patellar tendon.
It is your muscles that support the structure of your knee, when you apply pressure to the top of your knee, you are applying pressure from a direction that the knee is not designed to take it, this can cause patella maltracking, as well as put lateral stresses on you meniscus and ligaments (ACL, PCL).
This is not an issue if you only do it in moderation (help you get up that last step), but over time, especially if your muscles are already fatigued, it can cause serious injury.
Your best friends are now a pack of ice and an a chair. You need sufficient rest for your knees to heal. These musculoskeletal injuries are the kind that are notorious for reappearing if you don't give them adequate time to repair themselves. You need to rest beyond the point of your knees feeling better in order for them to heal fully.
Don't forget your walking stick next time. Consider investing in hiking poles, they look kind of dorky, but they undeniably save your legs on long hikes.