In this paper the authors address the problem of surveillance of bedridden patients in hospitals and residences for elderly. Unfortunately, patients cannot be supervised by operators 24 hours a day, given the associated costs. An attempt to solve this problem is already provided by wearable devices. This paper describes a 4.0 system implemented to overcome the limits (identified by interviewing a sample of nurses belonging to different facilities) of the wearable devices available on the market. The system proposed consists in monitoring the bed, instead of the patient, through applied sensors. By centralizing and analyzing the data collected it is possible to promptly inform the operative center of the occurrence of risky events to which bedridden patients are normally subjected. The scope of the system is preventing such risks, where possible, or mitigating their effects with a real time intervention. A case study on an active facility, conducted as a pilot project, confirms the humanitarian and economic benefits for patients and facility.