As Mount Sinai’s Chief of Pulmonology, Dr. Charles Powell has the daunting task of making sure the hospital has enough ventilators to keep the ever-increasing surge of COVID-19 patients alive.

So when Tesla’s Elon Musk donated 300 sleep apnea machines to the hospital instead of the much-needed medical devices, Powell immediately set about figuring out a way to put the gadgets to use.

“These machines are intended for use in the home primarily for patients who have sleep apnea or patients who have other types of lung failure. And they typically work by connecting the machine to a mask that the patient wears,” Powell, chief of the division of pulmonary, critical care and sleep medicine at Mount Sinai, told The Post.

That poses a problem, Powell explained — intubating patients with an endotracheal tube down their throat is much more effective than delivering oxygen through a mask, and masks increase the risk of “aerosolizing the virus” which puts health care workers at risk.

Powell, 57, convened a team of the health network’s top sleep physiologists, anesthesiologists and pulmonologists to help solve these problems and within five days, they had a solution.

They came up with two creative modifications for the apnea machines. First, they added a circuit to connect the apnea machine to the tube in an intubated patient’s throat, so they wouldn’t have to use a mask.

Then they added “viral filters” into the circuit so the virus wouldn’t be dispelled into the atmosphere.

The team went a step further by adjusting the machines’ monitor so health care workers could safely tweak them from outside of the patient’s room, further reducing their risk of exposure.

“[The devices] only have a really very small display that’s on the top of the machine. And that’s not really conducive to be able to know the status of the ventilator at all times if it’s in a patient’s ICU room,” Powell said.

“What we were able to do was make a connection between that home ventilator, now in the patient’s ICU room, and a monitor that we could place outside of the room.”

Powell’s team tested out the modified machine in Mount Sinai’s simulation center, saw that it worked “very well,” then tried it out on a patient who responded positively.

It will be rolled out to more patients in the coming days.

He said the machines are best suited for people who’ve already been stabilized, which will free up traditional ventilators for the hospital’s most critical patients.

“When patients first come into the hospital and they need a ventilator for COVID pneumonia, they may have very high ventilator requirements … this is much better suited for patients” that have already stabilized, Powell said.

“We need to make sure we have enough ventilators, of course, for everybody at the beginning of the disease and all the way through the disease while they still need a ventilator.”

Powell said the hospital now has a commitment of another thousand apnea machines.

“And as soon as we have the supplies for another thousand circuits, we’ll be in position to increase our ventilator capacity by another thousand,” he said.

Do you have a nominee for The Post’s Hero of the Day? Email heroes@nypost.com.