I don't have direct experience with knee replacement, but I did use a trainer after hip surgery.
As soon as I could get onto the trainer (with help from my wife), I started using it. First with just a little resistance, increasing the resistance and time gradually until I was doing 2-hour sessions.
It helped greatly. By the time I got back on the road, I was able to keep up with my ride buddies (even though I still couldn't put full weight on the leg, so I carried a folding cane in my jersey pocket.).
__________________
Ride, Rest, Repeat. ROUVY:
terrymorse