A bed system comprising: a mattress ; a sensor configured to sense a feature of the mattress, and transmit readings to a data processing device; and the data processing device comprising a processor and configured to receive the readings from the sensor, determine if the readings i) indicate a user presence on the mattress and ii) indicate the user intends to sleep, and responsive to determining that the readings i) indicate user presence on the mattress and ii) indicate the user intends to sleep, transmit a command to a peripheral controller ; wherein the data processing device is further configured to store the readings from the sensor, and generate, based on the stored readings from the sensor, a model of the user's sleep behavior; characterized in that to determine if the readings ii) indicate the user intends to sleep, the data processing device is further configured to compare some of the readings from the sensor with the model of the user's sleep behavior and to compare the user presence on the mattress with a model of the user's sleep, wherein the model of the user's sleep comprises data indicative of a sleep schedule that identifies time-windows of likely sleep. a mattress ; a sensor configured to sense a feature of the mattress, and transmit readings to a data processing device; and sense a feature of the mattress, and transmit readings to a data processing device; and the data processing device comprising a processor and configured to receive the readings from the sensor, determine if the readings i) indicate a user presence on the mattress and ii) indicate the user intends to sleep, and responsive to determining that the readings i) indicate user presence on the mattress and ii) indicate the user intends to sleep, transmit a command to a peripheral controller ; wherein the data processing device is further configured to store the readings from the sensor, and generate, based on the stored readings from the sensor, a model of the user's sleep behavior; characterized in that to determine if the readings ii) indicate the user intends to sleep, the data processing device is further configured to compare some of the readings from the sensor with the model of the user's sleep behavior and to compare the user presence on the mattress with a model of the user's sleep, wherein the model of the user's sleep comprises data indicative of a sleep schedule that identifies time-windows of likely sleep. receive the readings from the sensor, determine if the readings i) indicate a user presence on the mattress and ii) indicate the user intends to sleep, and responsive to determining that the readings i) indicate user presence on the mattress and ii) indicate the user intends to sleep, transmit a command to a peripheral controller ; wherein the data processing device is further configured to store the readings from the sensor, and generate, based on the stored readings from the sensor, a model of the user's sleep behavior; characterized in that to determine if the readings ii) indicate the user intends to sleep, the data processing device is further configured to compare some of the readings from the sensor with the model of the user's sleep behavior and to compare the user presence on the mattress with a model of the user's sleep, wherein the model of the user's sleep comprises data indicative of a sleep schedule that identifies time-windows of likely sleep. <EOS>