ABOARD VTA BUS 22 — Sylvia Hernandez bundled up with extra clothing from her small pull cart and prepared to join the other dozen people trying to doze on the bumpy ride between East San Jose and Palo Alto. It’s still early, she said. Just wait.

“Later, it will completely be full of homeless people,” Hernandez said.

By midnight, the transformation from public bus into Hotel 22″ was well under way — and among the growing number of no-place-to-call-home riders was a father and his 10-year-old daughter.

“We don’t have a place to stay,” said the man, who wouldn’t give their names, but said they had spent nights this way for five months. “From early evening to morning, we’re on the bus.”

Line 22, the only bus route that runs 24 hours in the Santa Clara Valley Transportation Authority system, becomes an unofficial shelter each night, a mobile testament both to the resourcefulness of the region’s homeless and the agonizing challenge of finding shelter in pricey Silicon Valley.

Weary riders can start at the Eastridge Transit Center and travel for two-plus hours to the end point at the Palo Alto Transit Center. There, they wait for a return bus, and then maybe make the round trip again. Somehow, they manage to nod off despite the herky-jerky motion and lights coming on with each stop as an automated voice announces the location.

“The bus says to me that people are so desperate that they will ride it all night,” said Jenny Niklaus, the CEO of the nonprofit EHC LifeBuilders. “Think about it: We are in such a state of crisis that people are eager to ride a bus, and it’s been that way for years.”

One early morning last week, an older woman, who would identify herself only as Angel, said being a Hotel 22 rider comes down to simple survival skills.

“The bus,” she said, “is safety.”

The complex problem of homelessness is a hot-button issue in Silicon Valley at a time when the high-tech economy continues to fuel the expensive home and rental markets — widening the divide between haves and have-nots.

A 2012 U.S. Department of Housing and Urban Development report highlighted how the South Bay has become a front line to the homeless quandary not only here in the Bay Area, but nationally as well. It found that San Jose and Santa Clara County had the nation’s highest percentage of unsheltered homeless as well as the third-highest number of chronically homeless.

Using data from another census, conducted in January, it was estimated that 19,063 people in the county would experience homelessness this year. The survey found that 27 percent of homeless said they had been turned away from an emergency shelter in the previous 30 days — usually because of a lack of beds.

“There are 5,000 homeless on any given night, and we just don’t have enough housing for all of them,” said Ray Bramson, San Jose’s homelessness response team manager.

That explains Hotel 22.

The line is VTA’s longest and busiest route, ferrying about 20 percent of the system’s overall bus ridership. In the overnight hours, three buses make the meandering trip that runs from East San Jose, through downtown, onto the El Camino Real corridor into Santa Clara, Sunnyvale, Mountain View and finally Palo Alto — before heading back.

VTA officials make clear that homeless have just as much right to ride as anyone as long as they obey the rules such as no smoking, eating or drinking.

“We serve the public, and that includes anybody who has the need for transportation and has the ability to pay,” said Greta Helm, the VTA’s chief external affairs officer. “If people present a valid fare, there’s no reason to dispute them boarding.”

A one-way fare costs $2, but monthly passes can be purchased for $70, and VTA also has a program offering some free, quarterly transit passes to homeless and those in risk of losing their housing. So the Hotel 22 is a relative bargain in high-cost Silicon Valley.

As night stretched into early morning last week, late-shift workers and club-hoppers who mostly stared at their smartphones thinned out. They largely were replaced by people using the bus to catch some sleep rather than reach a destination. More were men than women, and the ages of all tended to skew older.

“This bus has all kinds of names, like Hotel 22 or some just call it ‘Life on the 22,’ ” said Tony Velgara, a bus operator. “These usually are nice people, but they’re just dealing with hard times. They’re just like anybody else.”

Hernandez, 52, sat near the front where she could stay close to her cart containing possessions. Hernandez said she has been homeless two years since losing her disability compensation, splitting nights between what she described as “benches” and Bay Area public transportation.

“People think it’s easy finding a place to stay, but in a bad economy, it’s very difficult to even get into a shelter,” Hernandez added. “And the winter shelters aren’t going to be opening for another month, and it’s going to begin to rain soon.”

When passengers disembarked in Palo Alto, they only had to wait a few minutes before climbing on a San Jose-bound bus. On this trip, the father slept sitting up in a back corner. His daughter was lying over three seats, covered in a blanket, a backpack serving as a pillow.

The father was uncomfortable revealing details about their lives. But he did say that he’s 40, has been unemployed and that he and his daughter, who is in fifth grade, are on a family shelter waiting list.

“She’s managing, much better than I ever expected,” the father said after waking her as the bus reached Eastridge at about 1:45 a.m. “I have no idea how she’s doing it. This is one of her best years so far in school.”

The girl, acting like a Hotel 22 veteran, had joined a large group of people gathering for another journey toward Palo Alto — a mixture of newcomers and those who had made the previous round trip.

“Daddy, the bus is coming!” she shouted in a voice both urgent and tired.

As it left the station, the Hotel 22 nearly was full.

“In the morning,” the father had said before boarding, “she’ll get on the bus for school.”

Follow Mark Emmons at Twitter.com/markedwinemmons.