Since the start of the recession, the number of Americans who have moved each year has fallen sharply for a host of reasons, including the sluggish economy and the increasing similarity of job options from city to city. When people do move, they have all kinds of reasons, including family, climate and, especially for those who move long distances, employment.
Read MoreVegas real estate: Sin City emerges from distress
But of those who moved more than 500 miles, the share who said they were chiefly motivated by housing has risen to 18 percent in 2014, from 8 percent in 2007, the earliest year such data is available, according to the Census Bureau. The desire for a new, better or cheaper home and the opportunity to buy instead of rent were among the housing-related reasons people cited.
The story was different from 2000 to 2006, when cities with high-cost housing grew more quickly than those with affordable housing, according to an analysis of metro areas by Redfin, a national real estate brokerage firm. From 2006 to 2012 — years that encompass the housing bust, recession and recovery — that pattern reversed itself, with most low-cost cities growing 2.5 percentage points more than high-cost cities. The analysis excluded cities with poor job growth.
Before the real estate market crashed, housing in four of the five fastest-growing metropolitan areas, including Cape Coral, Fla., and Riverside, Calif., was less affordable than in the average American city, judging by the relationship between the median home price and income for each metropolitan area. But from 2008 to 2012, all five of the cities with the most growth were more affordable than average, including Raleigh-Durham, N.C., and the cities of El Paso, San Antonio, Austin and McAllen in Texas.
"A large percentage of Americans had to read 'The Grapes of Wrath,' " said Mayor Mick Cornett of Oklahoma City, referring to the John Steinbeck novel that chronicled the flight of Oklahomans to California in search of a better life during the Depression. Now the grandchildren and great-grandchildren of those migrants are returning for the same reason. "It's 'The Wrath of Grapes,' " he said.