A patient support surface, such as a mattress, includes one or more sensors to sense movement of at least a portion of the mattress caused by extension or retraction of an associated mattress support section of a bed frame. A pneumatic control system adjusts inflation and/or deflation of at least one inflatable bladder of the mattress in response to a signal received from the one or more sensors.