Managers have apologised after maggots from a dead seagull fell through the ceiling of the maternity unit at Scarborough Hospital.
The trust is cutting 600 jobs as part of its cost savings
Medical director Dr Ian Holland said the bird had died on the roof, which was not an area covered by regular maintenance checks.
He stressed there was no health risk to patients or babies at any time.
"Living at the seaside, seagulls are a part of our lives, but this was entirely unforeseeable," he added.
However, the hospital denied that the incident was linked to cuts in its maintenance budget as the debt-laden Scarborough and North East Yorkshire NHS Trust tries to save £15m.
A trust spokeswoman said: "This incident does not relate to everyday maintenance as the roof space is not part of our standard checks.
"There is no link between the ongoing cost savings and the level of maintenance."
Dr Holland said: "It appears that a seagull died on the tiled roof above the maternity department.
"Unfortunately this led to there being larvae in the roof cavity, a few of which found their way through the ceiling fittings.
"As soon as we became aware of this, we took immediate action, bringing in specialist equipment to remove the dead bird from the tiles and cleaning out the roof cavity."
Dr Holland said all affected areas had been cleaned thoroughly and were now back to normal.
"I'd like to thank staff for their prompt actions and hard work and apologise to mums and families for any inconvenience," he said.
"It's been an example of how everyone in the NHS has to cope with whatever situation arises, and everyone has done a marvellous job to take such an unexpected incident in their stride."
No-one from the hospital unions was available for comment on Saturday.