After reading about New York City’s mayor begging for ventilators to treat COVID-19 patients, Bryan Martel in California saw a solution beside his bed: a device to help him deal with sleep apnea.

Martel doesn’t use the gadget that helps him breathe better while sleeping. “They’re really uncomfortable,” the engineer said. But it dawned on him: If technicians added oxygen to it, they could use it like a ventilator to help COVID-19 patients breathe while their bodies fight the coronavirus infection.

Hospitals in New York City, where more people have died of COVID-19 than in the 9/11 terrorist attacks, are critically low on ventilators, which help patients breathe through a tube in their throat. California is amassing thousands of ventilators to meet an expected demand in May, but doesn’t need them all yet. In fact, the state lent hundreds of them to harder-hit areas this week.

Martel also wanted to help places most in need now. So he called a dean at his alma mater, UC Berkeley, recently to propose a collaboration to repurpose sleep apnea machines to ventilate coronavirus patients. That conversation prompted the formation of a coalition of Bay Area doctors and engineers called the COVID-19 Ventilator Rapid Response Team.

“Support is coming from good people trying to make a difference right now,” Martel said.

Across the Bay Area, scientists, engineers, and doctors are tackling equipment shortages during the COVID-19 outbreak. The U.S. Food and Drug Administration changed its guidelines last month to allow doctors to use other breathing devices as ventilators, which Bay Area entrepreneurs said has fueled innovation.

• A biotech company in San Francisco is increasing mask protection by adding a battery-powered air filtration system, worn on the user’s back, shoulder, or hip, connected with a tube to provide clean air for health care workers. Instead of their usual role making feeding tubes and other medical equipment, about a quarter of Theranova’s team has worked on the coronavirus-inspired project since January. The company’s mask device will be tested and evaluated for approval by the National Institute for Occupational Safety and Health, CEO Daniel Burnett said.

• UCSF is 3-D printing more than 300 reusable plastic face shields used daily by its health care workers. And while the Exploratorium is closed because of the coronavirus, a group of exhibit developers repurposed the museum’s lab to build more face shields for the hospital.

• Seton Medical Center in Daly City, which had five floors taken over recently by the state for COVID-19 patients, is converting 16 anesthesia machines into ventilators to avoid a shortage. This week, the hospital had 19 coronavirus patients. Five were on ventilators.

Stanford Professor Stuart Coulson, who specializes in affordable design in the developing world, said he’s been “impressed and encouraged” by new projects. But he also cautioned eager entrepreneurs to take into account current supply shortages and shipping challenges in their designs and consider where they can get materials to scale up production.

On the bright side, the Bay Area is rich with resources, he said.

“One of the biggest advantages and resources is the can-do attitude of the ecosystem of innovation and willingness to try stuff that is available around here,” Coulson said.

One of those local innovation hubs is the Ventilator Rapid Response Team at UC Berkeley, which saw promise in sleep apnea machines. National research shows that as few as 1 in 3 people who had been prescribed a sleep apnea machine actually used it, a 2016 study reported. That means millions of machines may be sitting unused, Martel said.

Now, he’s helping redesign machines to help COVID-19 patients breathe. He works with Grace O’Connell, a UC Berkeley mechanical engineering professor and co-director of the Berkeley Biomechanics Laboratory, and her team of volunteer students.

A couple days a week, O’Connell suits up in a lab coat, gloves and a mask to enter her lab — which the university authorized to keep operating during the health crisis, but only for preapproved COVID-19 research projects. She supervises six undergraduate volunteers working remotely to draw designs and find supplies for the makeshift ventilators, which they expect to ship around the country in the form of kits that hospitals can easily put together.

But, in a quiet and almost empty lab, she also works in-person with two or three volunteer graduate students at a time to limit potential exposure to the coronavirus. They connect oxygen tanks to sleep apnea machines to test the flow of air through a breathing tube that would be inserted into a patient’s throat. Then she calls UCSF doctors for feedback on her tests and to find out how much oxygen they’re giving COVID-19 patients who need ventilation.

O’Connell’s team also added an air filter to keep a patient’s breath from leaking out and exposing health care workers — as happened in a Kirkland, Wash., nursing home before first responders knew they were in a COVID-19 hot spot, she said.

UC Berkeley’s Ventilator Rapid Response Team has set up a national registry to accept donated sleep apnea machines from the public. So far, it has received pledges of about 700 of the lightweight devices from across the country, but is finalizing the ventilator design before accepting shipments. They also have a full-time member devoted to getting other parts from manufacturers because supplies are hard to find.

The team hopes to send the first kits — with a sleep apnea machine, tubing and filtration — by the end of the week to New York. O’Connell has been in touch with the city’s public health department and two hospitals — Lincoln Medical Center and Elmhurst Hospital Center — hit hardest with ventilator shortages. Some New York City hospitals are already using the same concept: Mount Sinai Hospital also retrofitted sleep apnea machines donated by Tesla’s Elon Musk to ventilate patients and issued guidance for others to do the same.

Back in the Bay Area, entrepreneurs are proving that “necessity is the mother of invention,” Theranova’s Burnett said.

“You see everybody putting their energy into volunteering for COVID efforts or coming up with clever hardware shortages for (personal protective equipment) and ventilators,” he said. “It’s actually quite heartening.”

Mallory Moench is a San Francisco Chronicle staff writer. Email: mallory.moench@sfchronicle.com Twitter: @mallorymoench