Described herein is a barrier for a bed. The barrier is moveable between first and second positions, the first position for preventing an occupant of a bed from rolling out of a bed and the second position being a storage position. The barrier is securable in the first position by a securing means. When the barrier is in the first position the barrier is in an extended configuration and when the barrier is in the second position the barrier is in a compact configuration. The barrier comprises a locking means for locking the barrier in an extended configuration. The locking means is releasable by movement of the barrier from the first position to the second position.