What you are probably seeing is a mechanical compression pump designed to increase the flow of blood from the legs back to the heart. The increase blood flow stimulated the release of different chemicals in the body that are clot busters and also relax the blood vessel walls.
These two effects prevent blood clots from forming and keep blood clots that do form from attaching to the blood vessel. They also break down clots that start to form. The danger of blood clots is that they can break loose and travel to the heart (causing a heart attack) or to the brain (causing a stroke).
The pump works by using and on/off cycle that applies intermittent but repeated pressure to the legs. The limb sleeves fit over the legs and are connected to the pump with a special hose attachment. The on cycle applies compression for a much shorter period of time compared to the off cycle (e.g., eight seconds on, 40 seconds off).
The disadvantage of these units is they do keep the patient from getting up and walking. They are pretty bulky and uncomfortable for some folks. The on cycle can cause an impact sensation that bothers patients. Since blood clot prevention must be carried out for at least 10 days after surgery, these compression units aren’t always very practical.
Newer, portable units that can be worn while walking are being developed now. The patient can get up and move around, even walk with the help of a small, battery-operated unit. The unit can apply intermittent compression for up to six hours before recharging is required. They function under the same principles described above for the hospital-based units you are seeing on your father-in-law.