Hi, MBW!
I had my TKR the same day you did (I'm 60). I've worked in orthopedics for years and had the advantage of following a lot of patients during their postop programs, plus I have many friends who've already been through this. The one ongoing theme was rehab, rehab, rehab! I work on my flexion throughout the day, as well as strength, balance, gait, etc. It takes tremendous dedication and commitment, but I do believe it's worth it. It does require working through discomfort, but it does pay off.
I'm hesitant to share this with you because it's a good news/bad news sort of thing. but I, too, struggle with night pain. I get to sleep just fine, but when my body wants to shift positions, the pain of movement wakes me up instantly. The good news is, apparently this is quite common. The bad news is, it can go on for months! But knowing that it IS normal helps me cope. Like you, I find it difficult to find a comfortable position. Sleeping on my back with my leg straight is most comfortable, but eventually I simply have to move. I also have sleep apnea, so sleeping on my back is the worst position possible, but I manage. Definitely challenging! So I still wake up 7-8 times a night due to pain.
Bottom line, I share your issues in the sleep department, but I know it will get better. One thing that has helped me (because I didn't want to stay on the Ambien and narcotics my doc prescribed to me for this long) is taking timed-release melatonin at night. I actually take it with Excedrin PM and find I sleep longer between bouts of pain. I moved a small frig into the bedroom next to my bed and keep a gel pack in the freezer section. During the night, when the pain gets bad, I grab the gel pack (mine is an Elasto-gel, which totally wraps around the knee) and ice/elevate (ABOVE YOUR HEART) right there in the bed. I also find that getting up and walking around helps a lot. It's the static position of the knee for long periods of time while asleep that seems to create the pain response.
BTW, I have found the stationary bike to be a huge help, not only in loosening up the knee and building strength, but also in improving/maintaining flexion. I find I start out rather stiff, but after 20-30 minutes on the bike, I have much better flexion.
I hope the above helps. It's a slow process, but I have noticed steady progress - probably because I've made a daily rehab program my top priority and literally spend hours a day working on it. I have no doubt it will pay off in the long run. FYI, I find there are days when I get discouraged, too, so don't get the impression I have found this easy either. In fact, I posted a question to the masses regarding medial knee pain that I've been battling.
Wishing you all the best -
Linda