Squeezed by astronomical home prices and rents that are almost as unaffordable, a growing number of Bay Area residents are pulling up stakes and trading long commutes for cheaper housing.

They’re heading to places like Tracy, Mountain House, Patterson, Hollister and Los Banos. Some are buying bigger homes and others are renting for much less, hoping to put money aside for a down payment of their own one day, in a replay of the eastward migration during the dot-com boom.

“Rentals in the Bay Area are just too high,” said Alma Gomez, an administrative assistant for Union City who’s heading east with her family.

Gomez is among the Bay Area residents who are finding themselves priced out of the Bay Area housing market, which is experiencing an employment boom that has helped drive up the cost of homes and rentals.

While the number of Bay Area residents moving to outlying counties is hard to pin down, real estate agents say the trend is growing. And that’s supported by the rapid run-up in home prices in these communities.

Gomez and her husband, Joaquin Galvez, who works in Oakland, moved with their two children two weeks ago from an apartment in San Leandro to a rented house 50 miles east, a 11/2- to two-hour commute away, in Patterson in Stanislaus County.

They looked at a three-bedroom, one-bath home in Oakland offered at $1,700 a month before discovering a four-bedroom, three-bath home with a garage in Patterson for $1,350 a month.

“The house is great, but the commute will be horrible, especially because we will have to travel with two small toddlers back and forth because of our day care being in Oakland,” Gomez said.

Linda Sendig and her husband, Christopher, both in their early 30s, are moving to a new home in Brentwood, in eastern Contra Costa County, about an hour and 20 minutes from her job in Fremont.

The Sendigs are renting out their 950-square-foot San Jose home for $2,000 a month and buying a new 3,400-square-foot, five-bedroom, three-bath home for $494,000, far less than they would pay for something like it in San Jose.

“We are little scared,” Linda Sendig said. “It’s going to be a big change for us, but for the deal we are getting and the education our kids are going to get, we are ready to go.” Twenty-five people have applied to rent their San Jose home, a reflection of the Bay Area’s shortage of rental housing.

The move to outlying areas is reminiscent of the dot-com boom, when many Bay Area residents flooded into the smaller towns in search of housing. Many of these communities were hit hard with a wave of foreclosures when the bubble burst and are still struggling with the aftermath.

“It’s starting to pick back up again,” said Tracy Mayor Brent Ives.

New home sales in the Tracy-Mountain House areas are expected to increase 10 to 15 percent this year, according to Paul Desmet of the Ryness Report in Danville, which specializes in sales and marketing and research for new homebuilders.

“When all that job growth in Silicon Valley happens, the supply cannot provide enough housing, so there’s a spillover effect, and they come flying over the hills to the Amador Valley,” Desmet said. “And as the market gets stronger, they continue to Tracy and Mountain House.”

The demand for housing also has helped push up prices on existing homes, according to real estate information service DataQuick. In the fourth-quarter of 2013, the median sales price in Tracy for a resale single family home was $339,500, up 28 percent from the fourth quarter of 2012; Patterson’s median was up 45 percent to $228,750; Hollister was up 29 percent to $375,000; and Los Banos rose 37.5 percent to $185,000.

That compares to San Jose’s fourth-quarter median price of $645,000; Sunnyvale’s $964,000; Milpitas’ $648,000; Oakland’s $435,500; and San Francisco’s $867,000.

And rents are cheaper, too. Rents in Santa Clara County grew 35 percent in just four years and were up 10 percent to $2,153 from the fourth quarter of 2012, according to RealFacts, which calls it “arguably the most aggressive rent growth region we track.” The average rent in Tracy in the fourth quarter of 2013 was $1,186 a month, according to RealFacts, compared with $2,133 in Oakland and $2,022 in San Jose. RealFacts tracks apartment complexes with 50 or more units.

Peninsula resident Stacey Poncia says she’s just a rent hike or two from having to move.

“I’ve spent my entire life on the Peninsula,” said Poncia, a 38-year-old teacher at a school in San Mateo. “I’m at a point where I have to make a major change in my career or move out due to high rents. I feel like I’m barely staying afloat as a teacher.”

The reality, said real estate consultant Carole Rodoni, is that “people that can’t afford to live in very trendy areas are going to have to move out further to what I call the spoke cities in order to find affordability housing.” Rodoni, a longtime Bay Area real estate executive, operates Bamboo Consulting in San Mateo.

Shawneequa Badger, a San Jose real estate agent, said she’s changed her business to accommodate clients who want to move to Tracy and Mountain House, which is just over the Altamont Pass. She said half her clients are “new transplants into the San Joaquin Valley” looking for more for their money. “I just put couple into a home (in Mountain House) that’s over 2,000 square feet, was built in 2008 and has all brand new appliances, for $349,000.”

Brigitte Marquis said she and her husband, Ken, and their three children are leaving a rented townhouse in Milpitas and moving to a rental home in Tracy. They’re going to move in June or July, “but we’d move tomorrow if we could,” she said.

“It’s the closest place where the commute hopefully won’t kill us,” she said. “It’s affordable and we can start paying off our bills.”

The couple — he works for Santa Clara County and she works for the city of San Jose — hope to save enough for a down payment on a home five years from now. Their two-bedroom townhouse is $2,795 a month, while the couple is finding five-bedroom homes for $2,000 or less a month in Tracy.

The commute won’t be easy. “Without traffic, it’s 45 minutes from Tracy to Milpitas. With traffic it’s about two hours one way.”

Some people who work in South County are moving farther south.

Robert Heslop, an animal control officer for Santa Clara County, moved in November 2011 from San Jose to a 3,000-square-foot home in a new development over the Pacheco Pass in Santa Nella Village near Los Banos.

“I want to bet that half the neighborhood works in Silicon Valley or beyond,” he said.

Contact Pete Carey at 408-920-5419. Follow him on Twitter.com/petecarey.