My feet and legs and knees swelling at night. I am 64 years old and had problems with my ankles and surgery on each ankles some time ago. Now legs?

Varies. There are multiple potential causes. It may be a problem individually with your knees and ankle as you suggest, it can sometimes be a manifestation of vascular disease such as venous stasis disease. One of the more common reasons a person can have swelling in both legs is some form of fluid retention which can have many causes. A good medical checkup is a good place to start.
I would make sure. you don't have a clot in the lower extremities as a precaution.
A Swell time... I am not quite clear on timing of your symptoms. Are they swollen before you go to bed at night, or are the normal at bedtime but swell up as sleep through the night and are subsequently swollen in the morning.