A bed system comprising: a mattress (113, 301); 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 (136, 502, 702) and configured to receive the readings from the sensor, determine if the readings i) indicate a user presence on the mattress (113, 301) 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 (1002, 1004); 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 (113, 301) 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 (113, 301); 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 (136, 502, 702) and configured to receive the readings from the sensor, determine if the readings i) indicate a user presence on the mattress (113, 301) 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 (1002, 1004); 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 (113, 301) 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 (113, 301) 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 (1002, 1004); 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 (113, 301) 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.