SEATTLE — Every spring, a small group of about a dozen gray whales pauses along an epic migration from calving lagoons in Baja California to their feeding grounds in the Arctic. They travel more than 170 miles off their coastal migration route, to stop off in northern Puget Sound. There, they linger from about March through May.

Now scientists think they know why the Sounders, as this beloved group of regulars is known, likes to visit — and hang around.

New research confirms these whales have figured out a brilliant feeding strategy.

Combining drone photography with long-term data on the Sounders has enabled scientists to track the body condition of these whales from when they first enter Puget Sound until their departure to rejoin the migration north along the coast.

Last year was the first year of observations in a long-term study launched into the Sounders — and the results astounded scientists.

Within three weeks of arrival, the regulars they tracked with drone photography plumped up almost before their eyes, as the whales fed, day after day, on ghost shrimp, which the Sounders have taught themselves to target in near-shore waters.

Scientists had long thought these whales must be on to something important for them to bother traveling so far off course from their migratory route and stay so long. When they show up, many of them might not have eaten for seven months. Their ribs are showing.

But not for long.

Snuffling up ghost shrimp in hundreds of pounds per day, scientists estimate, the Sounders within weeks are looking robust indeed, said John Durban, senior scientist at Southall Environmental Associates. He is a member of the research team along with Holly Fearnbach, marine mammal research director at SR3, a Seattle-based science research nonprofit, and John Calambokidis of the Cascadia Research Collective, who has studied the Sounders for decades.

“It is remarkable,” Durban said. “They have stumbled on a strategy that works for them.

“I was shocked at how quickly they changed shape from a whale that looks emaciated … to a whale that is plumping out.”

Calambokidis, senior research biologist at Cascadia, has compiled observations of some of the visiting whales since 1990. That data, combined with the new drone photography and tags he is deploying on whales, is opening a whole new window onto the Sounders’ world.

Theirs is a high-risk strategy, they are learning.

The whales are quite daring, traveling up to a mile into the intertidal zone in the Snohomish River delta offshore of Everett. They really have to know where they are and how to get out of there as the tide drops.

“Any boater knows to be in an intertidal area can be a very precarious thing,” Durban said.

The tags that track the whales’ movement show the Sounders synch their feeding precisely to the high tide. They will bide their time for hours in deeper water, waiting for the tide to turn to give them just enough water at high tide to move in on ghost shrimp burrowed in the mud flats.

“Sometimes they are resting on the bottom, just waiting, then feeding at these furious rates for two hours on the high tide,” Calambokidis said. The whales brave remarkably shallow water for such large animals, a minimum of 36 feet long, and some as long as 42 feet.

They will feed in just 7 to 9 feet of water.

“When they are on their side feeding, you will see part of their pec [pectoral fin] out on one side,” Calambokidis said. “You will see them get a little anxious — they know they are in an edgy area.”

Typically the whales turn on their right side and put their head down into the sediment to pulse the mud against their baleen plate, and filter out the ghost shrimp, a meaty native crustacean.

It’s a strategy that has to be learned. While new gray whales seen among the regulars last season hung around with the Sounders, they never did venture into the shrimp beds. The naive whales arrived skinny. They stayed that way.

The amount of effort the Sounders deploy is remarkable. When the tide drops, thousands of feeding pits about 6 feet long and 2 feet wide typically are revealed.

Notably, the Sounders have not in 30 years of record-keeping succumbed to any of the downturns in the overall gray whale population in the northeastern Pacific, including the most recent, which took a quarter of the population. Perhaps their Puget Sound stop-off is buffering the Sounders from the ups and downs of ocean conditions, which scientists think could be one cause of the die-off — especially since so many of the stranded whales found during so-called Unusual Mortality Events are thin.

The picture of the Sounders that is emerging has shifted the understanding of gray whales even among people like Calambokidis, who have studied the Sounders for decades.

Once thought of as a relatively primitive species as whales go, with a limited social life and regimented migration route, it turns out the route isn’t so regimented, and that the Sounders have figured out a range of ways to find food.

And there is a lot more to their social bonds and dynamics than previously understood; some Sounders have been hanging together on their spring break in Puget Sound since the early 1990s.

“They have a lot more going on socially than we give them credit for,” Calambokidis said.

The Sounders’ ability to thrive here also is a good sign for Puget Sound, which demonstrably has the abundance to sustain even these large, hungry animals for months at a time.

The Sounders have proven resilient — not only thanks to their ingenuity and adaptability, but because of changes people have made to protect marine mammal populations, and clean up and sustain productivity of the marine environment. Marine mammal populations are growing, from transient killer whales to porpoises and humpbacks.

Puget Sound also is cleaner than in generations: Scientific surveys show a decline of persistent pollutants in the bodies of resident harbor seals, whose populations also have recovered since they were protected.

The exception to the marine mammal boom is southern resident killer whales, which are in decline along with the chinook salmon they depend on.

But that too is something people could resolve to change, Calambokidis said.

“These are empowering stories where these improvements are the effects of changes in human actions, not just a nice story about a whale doing well,” Calambokidis said. “It shows it is possible to make these sorts of changes.

“Southern resident killer whales could be another.”