As everyone has said, you need to rest to heal. But you asked: "...is it still ok at this stage to be taking pain meds?" I think this is about how much you are taking and how much pain you are in. Because some pain killers will make you very tired.
When I was about 10-15 days out from surgery, I was taking 2 oxycodone's, one in the morning, one in the afternoon. I did not like the sleepy feeling in the morning, and the pain was not bad, so I stopped the morning dosage. I showered, ate breakfast, did my PT, read various stuff, had lunch, then took one pill, slept for 2-3 hours in the afternoon. That one pill sufficed. It was enough to deal with the pain, and I stopped it soon after.
Many people need the painkillers for some time. Others don't.
Mark