Jan 23 (Reuters) - ResMed beat Wall Street estimates for second-quarter revenue and profit on Wednesday, powered by strong demand for its respiratory devices used to treat sleep apnea.

Adjusted profit of $1.88 per share beat analysts' average estimate of $1.80, according to LSEG data, while revenue of $1.2 billion topped estimate of $1.15 billion.

The California-based company's continuous-positive-airway-pressure machines (CPAP) help manage sleep apnea, a condition where the airway gets blocked many times during sleep.

Meanwhile, gross margin declined to 55.1% from 56.5%, mainly due to costs associated with the recall of the company's respiratory masks containing magnets. Analysts had expected gross margin of 56%, according to LSEG data.

The U.S. Food and Drug Administration earlier this month classified the recall as most serious. The company has said the products would remain on the market and the classification was due to a correction in the labeling.

ResMed has also shrugged off concerns over weight-loss drugs such as Novo Nordisk's Wegovy and Eli Lilly's Zepbound being tested to treat sleep apnea.

Zepbound or tirzepatide is in late-stage testing for patients with obstructive sleep apnea and obesity.

Lilly's study could be a "sentiment overhang" and patients could potentially drop off CPAP treatment as they lose weight, Jefferies analyst Matthew Taylor said in a note ahead of the earnings report.

(Reporting by Mariam Sunny in Bengaluru; Editing by Sriraj Kalluvila)