Provided are a method of analyzing sleep and an AI server having a sleep analysis function. The method of analyzing sleep using an AI server includes receiving sleep state data obtained through a monitoring device; determining factors affecting a sleep time by applying the sleep state data to a previously trained sleep analysis model; and determining an appropriate sleep time by applying the factors affecting the sleep time to the previously trained sleep time estimation model. Therefore, by easily estimating an appropriate sleep time of a user, the method can contribute to a user's health promotion. Artificial intelligent device according to the present invention may be linked with an artificial intelligence module, a drone (unmanned aerial vehicle (UAV)), a robot, an augmented reality (AR) device, a virtual reality (VR) device, devices related to 5G services, and the like.
METHOD FOR PREDICTING COMFORTABLE SLEEP BASED ON ARTIFICIAL INTELLIGENCE