Oh,
@Texaslady, you need hugs... and a hot toddy (or other beverage of choice), and anything else that will help you relax and rest.
Sleep is the desire and nemesis of all TKR patients. It's a rare person who has this surgery AND gets to sleep happily after, at least for a few months. Yes. Months. Everyone is different, but very few sleep well until a few months out.
I can offer some tips. They may help, or maybe not.

One is to just embrace your current situation and accept that you will have to grab a few winks whenever possible, usually while resting during the day. A few others:
* have a nightly ritual. Your husband rubbing your back sounds like a promising one! A little ritual tells your brain and body that it's time to wind down and... sleep. It can't hurt.
* ask your personal physician if you can have a sleep aid, just for this period. Some here recommend Trazadone (my FIL used this... it's mild and works well)
* don't lie with your legs flattened out --this hurts unless you have full extension (and maybe even then). I slept with my legs elevated on a foam wedge for almost four months. Now, if I want to lie flat on my back, I place a firm regular pillow under my knees. They sigh with happiness and are content.
Sleep will eventually return. I struggled at first but now sleep just as well as before surgery. However, there's no way to force sleep. Disrupted sleep is one of the most --if not THE most-- irritating thing about this surgery!