On weekdays, bus driver Adan Miranda hauls people across Silicon Valley. But his own roughly 100-mile commute home to a Sacramento suburb nearly killed him, so 15 years ago he decided to start sleeping in a San Jose parking lot four nights a week.

It’s a choice that’s becoming more common for people who want to work in the Bay Area but can’t afford a place to live. What’s unusual about Miranda’s situation is that his parking space is provided by his employer, the Santa Clara Valley Transportation Authority. For 20 years, the agency has doled out permits to sleep on its property to employees who have homes 50 miles away or farther.

Now the quirky perk may be coming to an end. Its elimination places an ironic underscore on the region’s housing crisis: The bus drivers’ temporary bedsits may have to make way for permanent development.

The parking-lot permits are “an accommodation we made to help alleviate the challenges being experienced by a number of employees who live out of the area,” VTA spokeswoman Holly Perez said in an email.

The agency, which is facing a $26.4 million budget shortfall for the coming fiscal year, is under pressure to raise revenue. It has looked at leasing properties to developers to build housing and office space. Two years ago, VTA reduced the number of lots employees could live in and stopped accepting new applications. The remaining spots held by 28 employees will be phased out through attrition. A local division of the Amalgamated Transit Union, which represents VTA bus drivers and mechanics, opposes that.

“We feel the program is an unfortunate condition of the times we live in,” said John Courtney, an officer for the Amalgamated Transit Union Local 265.

A third of bus runs given to drivers require split shifts on weekdays, with gaps in the middle of the day when they are not working, according to the transit agency. That makes it difficult to go home to rest if they live far away, Courtney said.

VTA drivers’ wages start at around $18 an hour in training. After 4½ years, they can earn about $35 an hour, or roughly $80,000 a year, the drivers union said. Even on that salary, buying a home in the Bay Area is out of reach. To rent a two-bedroom home in the San Jose area, workers need to earn $48.50 an hour, according to a report by the National Low Income Housing Coalition.

Miranda, 48, said the decision to sleep weeknights inside his 18-foot trailer in VTA’s parking lot wasn’t an easy one, but when he almost died after falling asleep on the road three times in the same week, the choice was clear.

“This what I have to do,” he said. “I want to see my family grow.”

Miranda and his wife bought a four-bedroom home in Elk Grove (Sacramento County) in 2003. He’s looked into similar work closer by, but the job paid about $12 an hour less, so he decided to stay at the VTA — with the trailer. Miranda goes home Friday night and drives back to work Monday morning.

At first, the decision was hard on his children. “My oldest kids — they took it hard because we’re raised as a close-knit family,” Miranda said. “They didn’t see me there every day.”

The higher salary and the cash he saved not having to drive back and forth helped Miranda send his children to Disneyland with relatives. (Miranda and his wife didn’t go so their children would have pocket money for the amusement park.) Miranda said he’s thankful the VTA helped him shorten his commute, which is now just a short walk to his bus.

Bus driver Stan Marshall, who also lives in Elk Grove, said that being able to rest near his job has helped ease the wear and tear on his body from the long commute. He’s slept in a VTA lot for more than a decade and said that if the transit agency had not offered the benefit, it would have been harder to stay at his job.

“Our jobs are tough enough driving and trying to be safe out there,” said Marshall, 64.

While there are break rooms with beds for workers to rest in during the day, they can’t sleep there overnight, Courtney said. Some of the drivers choose to sleep in their cars on residential streets because the agency is no longer issuing lot permits, he said.

The VTA says providing the accommodation to employees is straining its limited resources. There are costs associated with the permit process and securing the vehicles, said spokeswoman Brandi Childress. The agency is looking at other solutions such as reducing split shifts through schedule changes.

One thing the VTA is not doing: exploring other employee housing options.

The agency thinks it can address the region’s housing shortage and boost revenue by developing its properties instead. And that includes the parking lots.

In a May presentation, Jessie O’Malley Solis, a VTA official, said its real estate “is a tremendous opportunity for providing new housing opportunities” that could accommodate more than 5,100 market-rate units and 1,800 affordable homes, along with more than 4.3 million square feet of commercial space. The agency has 205 acres in a portfolio it hopes to lease for development.

Among the properties previously considered for development was the remaining employee RV lot. No housing was included in a 2016 proposal for the space. VTA spokeswoman Perez said the agency didn’t continue the process because it “did not receive a significant response by qualified bidders.” If the VTA were to lease the lot, employee parking would move elsewhere, the agency said.

Courtney, of the union local, said he’s in favor of VTA building housing on its property, especially if a percentage of low-cost housing can go toward employees.

“It’s something done in other countries,” he said. “We haven’t done it here yet.”

Wendy Lee is a San Francisco Chronicle staff writer. Email: wlee@sfchronicle.com Twitter: @thewendylee