A bed, includes a frame 11, a deck 12 connected to the frame and a siderail 16, 17, 18, 19 supported by either of the frame and the deck. The siderail includes a base 22, 162 and an extension 23, 163. The extension has a retracted position adjacent the base and at least one deployed position spaced further from the base. A lock 30, 200 resides in the base is selectively engageable with and disengageable from the extension for resisting or enabling movement of the extension relative to the base.