I have had 4 surgeries in four years, two of them PKRs, and what has worked far better than pillows is to build up a wedge of blankets from your hips to the end of the bed with about 8 to 10 inches high at the foot of the bed. This will allow you to have your feet up and still turn on your sides and bend your knee if you need, and you can't accidentally kick it off the bed.
Second, ice right before you go to bed and then take an ice pack to bed with you. An ace bandage will hold it in place really well. And then have a couple of back-ups so if you wake up you can ice again and hopefully fall back to sleep.
It sounds as if you don't have an ice machine for your knee, but check if there is someone you know who will lend you one. I used mine for almost 2 months after each surgery and it was a godsend. Sometimes the doctor just doesn't think about it, so try asking for one if you can.
A lot of your pain is probably still due to the bruising that shows up post-surgery, so if you haven't tried it yet try taking Bromelain which is an extract of pineapple that helps your body get rid of damaged cells. There was a study in the Lancet a few years ago that showed it was helpful post-surgery. I have used it each surgery and my OT was surprised how fast I healed. You also might try kineseotape on any serious bruises. My PT applied it this last surgery and it worked like a charm.
Swelling often gets worse as the day goes on, and pain tolerance goes down-what a lousy combination! When you are seated with your feet up (often I hope) try gentle strokes up your leg from about mid-calf to groin for about 10 minutes at a time. Its called lymphatic massage and it helps get the excess fluid that settles in your leg and knee move out more quickly. Try it-it works.
I can second the recommendation for melatonin. It helps you fall asleep and stay in deeper sleep longer. It is a hormone that diminishes with age and so you are just boosting your levels to what they were in the past. Definitely worth trying.
Good luck and I hope you have a better night tonight.