A method for optimizing light and sound programs for a falling asleep phase and for an awakening phase of a first user, in a system comprising, for the first user and each of a plurality of other users, a bedside device, at least a bio parameter sensor (2,3), a smartphone, and additionally for all users at least a central server, the method comprising the following steps: /a1/ collecting, with regard to the first user U01, and for each past night, sleep data and sleep context data, said sleep data comprising at least a light and sound program played for the falling asleep phase and for the awakening phase, bio parameters and ballistographic measurements and sleep patterns sequence deduced therefrom, said sleep context data comprising at least previous daytime activity and variations from one day/night to another thereof, /a11/ sending this sleep data and sleep context data to the central server, /a2/ collecting, with regard to a plurality of the other users, and for each past night, the same and/or similar sleep data and sleep context data, /a21/ sending this sleep data and sleep context data to the central server, /b1/ at the central server, building, from the data collected, a user-specific model of user sleep behavior for the first user, /b2/ at the central server, building, from the data collected, user-specific models of user sleep behavior for each of the other users, /c/ comparing said user-specific models of user sleep behavior to define groups of similar users, including a first group of users to which the first user belongs to, each group of users being allocated with a group meta-model with decision rules and preferred playlist of sound tracks, the group metal model comprising a preferred playlist of soundtracks of the group and the decision rules being parametrized by the parameters contained in user-specific model of sleep behavior to order the sound tracks, /d/ sending the group meta-model relative to the first group, from the server to the bedside device or to the smartphone of the first user U01, /e/ at the bedside device or at the smartphone, displaying to the first user, using the group meta-model and in function of the time to go to sleep, a recommended list of light and sound programs, comprising an ordered list of soundtracks, or a particular light and sound program, namely a single choice from the recommended list, for the upcoming falling asleep phase and/or the next upcoming wakeup phase. /a1/ collecting, with regard to the first user U01, and for each past night, sleep data and sleep context data, said sleep data comprising at least a light and sound program played for the falling asleep phase and for the awakening phase, bio parameters and ballistographic measurements and sleep patterns sequence deduced therefrom, said sleep context data comprising at least previous daytime activity and variations from one day/night to another thereof, /a11/ sending this sleep data and sleep context data to the central server, /a2/ collecting, with regard to a plurality of the other users, and for each past night, the same and/or similar sleep data and sleep context data, /a21/ sending this sleep data and sleep context data to the central server, /b1/ at the central server, building, from the data collected, a user-specific model of user sleep behavior for the first user, /b2/ at the central server, building, from the data collected, user-specific models of user sleep behavior for each of the other users, /c/ comparing said user-specific models of user sleep behavior to define groups of similar users, including a first group of users to which the first user belongs to, each group of users being allocated with a group meta-model with decision rules and preferred playlist of sound tracks, the group metal model comprising a preferred playlist of soundtracks of the group and the decision rules being parametrized by the parameters contained in user-specific model of sleep behavior to order the sound tracks, /d/ sending the group meta-model relative to the first group, from the server to the bedside device or to the smartphone of the first user U01, /e/ at the bedside device or at the smartphone, displaying to the first user, using the group meta-model and in function of the time to go to sleep, a recommended list of light and sound programs, comprising an ordered list of soundtracks, or a particular light and sound program, namely a single choice from the recommended list, for the upcoming falling asleep phase and/or the next upcoming wakeup phase.