What do pilots do to prevent DVT?
Deep vein thrombosis (DVT) or Traveler’s Thrombosis occurs when blood in a vein (most often in lower extremities) becomes stagnant and then forms clot. If you think about it, the pilots are at less risk compared to passengers in this matter. FAA advices certain steps to prevent DVT, like,


Increasing leg muscle activity during long periods of sitting improves blood flow in the legs. This may include walking around the cabin or exercising your lower legs and ankles while seated.

Drinking adequate fluids, and avoiding alcohol and caffeine, may also help by preventing dehydration.

Some recommend taking short naps, instead of long ones, to avoid prolonged
inactivity.



It would be much easier for the pilots to do these things compared to say, passengers.

Pilots usually have more room in the cockpit compared to passengers in cabin.

In long haul flights, there is usually a standby crew member who is rotated so that the pilot could get some movement and rest.

It is certainly practical for the pilot to get up and stretch his/her legs during flight. It is not as if they are flying the aircraft hands-on every second for the entire flight. In any case, the flying duties could be alternated between the two flight crew without any problem.

It is not unknown for pilots to take short naps in the cockpit


Studies indicate that the DVT is more prevalent among the passengers than the pilots. According to Deep vein thrombosis in commercial pilot:

10 percent of air travel passengers older than 50 years develop symptomless DVT during prolonged flights. DVT among air travellers has been documented, but is rare among pilots flying commercial aircraft.

Also, it seems (some pilots, at least) do wear flight socks.

It seems that the pilots don't take the wearing of oxygen mask seriously.