As already mentioned, it very well could be that hip and back pain can be caused by a change in alignment stance due to a TKR. Sometimes people find relief in pt that helps them target muscle groups that are weak because they have been used for a long time in a pre-knee surgery alignment. I hope your your extension gets better with your exercises. More pt.... I know right?
Scar formation on the top of the knee is a tough one. There is so much more skin tension on the outside of joints than many other places in the body. Can depend on time since surgery, body composition, susceptibility to keloid or hypertrophic scarring, skin condition before surgery and, I'm sure, a number of other factors. I have heard that silicone sheets can help minimize hypertrophic scarring but have no personal experience with it. Vitamin E does help with scar minimization when applied before a scar has healed over but litttle evidence of scar minimization after full skin healing has occurred. Some people employ dermatological methods such as microneedling, lazer therapy and cosmetic surgery to remove/minimize but I could be a costly venture. I employed moisturizer and vitamin E post surgery and then got to a point where my TKR scar is a badge of honour
From experience, sleep can be elusive and fleeting for a while, especially during the recovery journey. My sleep habits changed significantly after my TKR, however I'm not sure if it's only my knee or if it's a "getting old" thing...lol. Mostly I've found that joint inactivity for more than a 2-3 hours is what wakes me up. Lots of people comment that many times TKR pain is aleviated by joint movement which is why we are up aimlessly walking around the kitchen sometimes at 2AM. Melatonin helps some people including my wife, get better sleep but was not super effective for me. It does get better with time... I am almost 2 years post TKR and sleep is not too bad.
Might not be alot of concrete advice to go on but with TKRs it seems that aches, pains and life changes are part of the healing journey. We humans just decide if we can roll with it and strive to make it better or accept the cards we a have been dealt. There are lots of helpful people on this site and then vast knowledge and info shared accross Bonesmart is both helpful and mentally soothing for many. It looks like you are seeing advancement and progress in your knee recovery which is great. Keep your eye on the prize, you are getting there step by step