America's wealthy households are increasingly moving to coastal cities on both sides of the country, but those with more modest incomes are either relocating to or being pushed into the nation's Rust Belt, according to a new study.

That's creating "income sorting" across the country, with expensive cities like Los Angeles, New York and Seattle drawing wealthier residents. For instance, Americans who move to San Francisco earn nearly $13,000 more than those who move away, the study found. Conversely, those who are moving into less expensive inland cities such as Detroit or Pittsburgh earn up to $5,000 less than those who are leaving.

To be sure, gentrification – when the rich move in, pushing out the poor – is a well-known and long-standing trend that's impacted neighborhoods in cities such as New York. But the study from Dr. Issi Romem, a fellow at the Terner Center for Housing Innovation at the University of California, Berkeley, indicates gentrification may now be a national phenomenon.

Get Breaking News Delivered to Your Inbox

The trend may not only hurt poorer residents who are forced out, but also the rich Americans who move to coastal cities. Well-off residents who move to already expensive cities like San Francisco are bidding up real estate prices until property becomes unaffordable for all but the very richest families. Many end up renting -- until that, too, becomes unaffordable.

Why the allure of the Atlantic and Pacific coasts? Most coastal cities like Boston are now highly desirable due to university access and high-tech jobs. But their close proximity to water means they are running out of room for construction.

The coastal "in-migrants"

The wealthy people who are moving to the coasts, or what the study calls "in-migrants," are often young, highly educated professionals who want to rent rather than buy. They are also typically multi-income households with roommates.

When people start families, they tend to leave those expensive cities. For instance, Sacramento has fewer earners per household among in-migrants "because it is a key destination for those leaving the San Francisco area in search of cheaper housing," Romem said.

Sun Belt cities such as Miami, Orlando and Tampa have benefitted from the migration of wealthy seniors, who are able to afford the cities' higher-priced homes.

Interestingly, these trends come as fewer Americans are moving for work, according to findings from Challenger, Gray & Christmas. Over the past decade, 11 percent of job seekers relocated for work, compared to nearly 19 percent who relocated for greener employment pastures in the prior decade, the employment firm found.

Of course, the rich aren't only migrating to coastal towns.

The nation's wealthiest community is Jackson Hole, Wyoming, located in the Rocky Mountains. And Phoenix, a mecca for well-heeled senior citizens, is also high up on the list.

In contrast, although Pittsburgh has multiple universities, it hasn't been able to hold onto these graduates, the study noted. And according to the Economic Policy Institute, there is a lot of income inequality even within coastal states like Connecticut, Florida and New York.

There are inherent dangers of income sorting, such as producing labor shortages in some wealthy cities, especially in low-paid service industries. And while schools and services will likely improve in the more affluent and highly-educated areas, they could decline in less affluent regions, making the have-nots in America's heartland angry.

"Given the current political scene in the U.S., the importance of polarization goes without saying," said Romem.