Either the department has a spare bed that they can use, the patient sleeps on the transport stretcher until the bed is repaired or the patient may sleep on the mattress on the floor.
Better to find the fault whilst the patient is out of the bed, rather than the fault causing harm to the patient.