The invention relates to a mattress (110) made of elastic foam or rubber material and comprising individually controllable air chambers (120, 120a) that are inserted in the transverse direction and are equipped with at least one pressure measurement sensor, the pressure in the air chambers (120, 120a) being adjustable based on an algorithm which is used by a control device and which correlates with sleep quality calculations also made by the control device and/or which follows the principle of the changing pressure sensed. The invention also relates to a corresponding method.