More Americans moved to Texas in recent years than any other state: A net gain of more than 387,000 in the latest Census for 2013. And Austin was the fastest growing major city.

Jobs is the No. 1 reason for population moves, with affordable housing a close second.

"It take two things to draw people inland in big numbers: jobs and housing affordability," said Nela Richardson, chief economist for the real estate broker Redfin.

Texas and other heartland states have two advantages that translate into affordable housing: Plenty of cheap land around cities and easy regulations that enable developers to build quickly.

Related: Best cities for Millennial buyers

Nine of the top 10 fastest growing U.S. metro areas last year were ones where homes were more affordable than the U.S. average, according to Redfin. Many were in Texas, Oklahoma, Utah and other heartland states.

Five Texas cities -- Austin, Houston, San Antonio, Dallas and Fort Worth -- were among the top 20 fastest growing large metro areas.

Some smaller Texas metro areas grew even faster. In oil-rich Odessa, the population grew 3.3% and nearby Midland recorded a 3% gain.

Jobs was the main driver in Austin, where population rose by 2.6% between 2012 and 2013. That's nearly four times faster growth than the United States as a whole.

Jobs are plentiful in Austin, where the unemployment rate is just 4.6%. Moody's Analytics projects job growth to average 4% a year through 2015.

Just as important, many jobs there are well paid: The median income of more than $75,000 is nearly 20% higher than the national median. The median home price is $243,000, higher than the U.S. norm, but a price level that income can support.

Related: Mansions for under $1 million

During the boom years, population actually grew faster in high-priced markets like New York and San Francisco.

Rapid price gains made buyers less concerned about overpaying for homes. Plus, they had banks lining up to lend them money.

Once rapid home price jumps were taken out of the equation, affordable housing markets with strong economies became even more attractive to people looking to relocate.