As long as the bed rail is installed properly and secured to the frame it should work with a hospital bed. However, I would be worried about an air mattress not having enough weight to not move around when trying to get out of the bed.