Ask Mary Anne Roller about what she wears on a plane, and she starts with her legs. “I’m definitely a convert to using the knee-high compression socks,” says Roller, a retired secretary from Lake Wales, Fla.

Roller, 76, bought a three-pack of the socks online and used them on a flight from London to Orlando. “What a difference,” she says. “I had absolutely no swelling in my legs or feet on that flight.”

But ask Trenton Marsolek, 21, about compression socks, and he’ll tell you “they’re a waste of space.”

The summer before the pandemic, Marsolek, who works at a nonprofit in D.C., flew around the world. On his first flight from Chicago to Auckland, New Zealand, he wore a pair of compression socks. “Looking back on it, I don’t think they were necessary as long as I stood up several times during the flight and walked around,” he says.

So do you or don’t you need compression socks when you fly? Short answer: You probably do. But it helps to understand how the socks work, why they’re important and when you need them.

If you’ve ever taken a long flight, you’ve probably noticed that your legs and feet begin to get puffy. That swelling can be dangerous. In extreme cases, you might develop deep vein thrombosis (DVT), where a potentially fatal blood clot forms in a vein deep in the body. Most deep vein clots occur in the legs.

“Compression stockings create external pressure to lessen the gravity-related venous blood stagnation in the leg,” explains Kurtis Kim, a vascular surgeon who directs the Vascular Laboratory at the Vascular Center at Mercy Medical Center in Baltimore.

Compression socks improve the natural calf muscle pump, which is the force that enhances the return of venous blood from the lower extremities to the heart, says Michael Ombrellino, a board-certified vascular surgeon for the Vein Institute of New Jersey. “Most travelers will benefit from wearing compression stockings.”

Most — but not all. You should especially consider compression socks in the following two scenarios:

If you’re prone to DVT. If you’re at risk of a blood clot, you should wear compression socks. “Travelers who have a history of varicose veins, family or personal history of deep vein thrombosis should wear compression stockings when traveling,” Ombrellino says.

If you’re on a long flight. “There is considerable evidence that on trips of more than four hours, people who wear compression stockings have a statistically significant lower chance of developing deep vein thrombosis,” says Bob Bacheler, managing director of Flying Angels, a medical transport company. “On international trips, many of our staff — myself included — wear compression stockings.”

How does age factor in? Should older passengers always wear compression socks, and can younger passengers ignore them? The experts I spoke with said blood clots can affect anyone, regardless of age. But travelers said they saw more need for compression socks as they aged.

“For some reason, once I turned 60 . . . , my legs and ankles were getting somewhat swollen,” says Jerry Slaff, who works for a federal agency in Silver Spring, Md. “Not horribly, but noticeable.”

Slaff’s orthopedist recommended a brand of compression socks that, at $49 a pair, were a little pricey. Instead, he found a pair of Comrad compression socks online, which start at about $12 and come in several fashionable colors.

“My legs feel better,” Slaff reports. “They’re no longer swollen, but more to the point, I get extra support and feel refreshed.”

Compression socks look like regular socks and come in different compression strengths. For example, mild compression TrueEnergy socks, which come in a two-pack ($19.99) are indistinguishable from other socks. Calf-length Fits socks ($24.99-$49.99 per pair) offer firmer compression, and some styles are available in bright colors, as well as standard black and white. Manufacturers measure compression strength in mmHg (millimeters of mercury), just like blood pressure.

“Pressure in the 15 to 25 mmHg range is going to be firm, but not so tight it will be uncomfortable,” says Paul Miller, an editor for Compression Design, a site that reviews compression products. “This is what I would suggest for a long-flight traveler.”

I consulted several travel experts, and they, too, agreed that everyone should consider a pair of compression socks. Cindy Sanborn, an agent for Travel Leaders in Maple Grove, Minn., always wears compression socks when she flies, and she recommends them to clients.

“They’re great at keeping the circulation in my legs going strong as well as keeping my feet warm,” she says. “Anyone who has any kind of circulatory issues should be wearing them for any lengthy periods of sitting, especially in confined airline seats.”

In fact, I probably would have benefited from compression socks a long time ago. I noticed my feet swelling on a flight when I was in my early 20s, and it has since gotten worse. (Marsolek, who works at the nonprofit, might want to keep his socks for now.)

I’ll be packing my socks for my transatlantic flight. And they’ll get some good use on that marathon train ride from Lisbon to Paris. Yeah, I might feel silly, but it’s worth it.

Elliott is a consumer advocate, journalist and co-founder of the advocacy group Travelers United. Email him at chris@elliott.org.

Read more from Travel: