A bed comprises: a height-adjustable lying surface; a head part, a foot part, and/or at least one side part; a motor to adjust the height of the lying surface; and a control system to control the motor. The control system comprises at least one sensor and at least one actuator. The sensor includes: at least one actuating element actuatable to generate a control signal; an interface to emit the control signal; and a fastening element by which the sensor is attachable to the head, foot, or side part of the bed without a tool. The actuator includes: an interface to receive the control signal; and a switching element to switch at least one current path or an adjusting element to set at least one voltage, one current, or another physical variable based on the control signal.