I'm only mentioning what did/didn't work for me and why I wanted my extension back sooner rather than later...
I'm slow to get my range of motion back after every knee surgery (11 now). Unfortunately, I tend to sleep better on my side with legs bent, or on my back with a pillow under the operative leg. However, I
always woke up with less extension and walked weirdly for a good chunk of the day--to the point it messes my hips up for weeks.
This time around, the hip pain is worse, the back spasms started sooner, and the walking was atrocious up until a week ago. I started spending 4 minutes every morning doing a prone hang, where I lay on my stomach and let my knees hang off the end of the bed or table, improving my extension slowly with no weights, only gravity. Many PTs have people do this with weights to get their extension back sooner, but too long of a prone hang and using weights can cause the hamstrings to spasm in distress... causing guarding and LESS extension. The way I'm doing it makes me walk MUCH better throughout the day and never stresses the hamstrings. It actually feels VERY good.
So even though I knew extension would come in time, my poor hip/back couldn't wait on nature to take its course.

Do what you need to do for you, based on where you're at in recovery.