Weight after surgery
I believe you mean will you gain weight from not moving around? If that's the case, it's best that you start moving around as soon as you are medically cleared to do so.
One concern is that if you don't move the knee asap you may lose range of motion at the knee, and not only negate the goals of the operation in the first place but your knees may get worse. You won't get thinner sitting around.