FIELD: medicine.SUBSTANCE: system comprises a baby-supporting body, one or more sensors that form one or more output signals transmitting information related to the baby position on the upper surface of the baby-supporting body, a plurality of light sources carried by the baby-supporting body, that, in response to activation of a subset of the plurality of light sources, electromagnetic radiation is directed through the upper surface of the baby-supporting main body, and one or more processors configured to execute computer program modules that contain a position module configured to determine the baby position on the upper surface of the baby-supporting main body. The position includes the direction of babys eyes and an illumination module configured to control one or more subsets of light sources from the plurality of light sources based on a specific position of the baby and the direction of babys eyes so that the emitted electromagnetic radiation provides phototherapy for the baby, and so that the emitted electromagnetic radiation does not directly fall onto babys eyes. The lighting module is further configured to deflect and/or turn off one or more subsets of light sources close to the babys eyes in response to determination that the babys eyes face the upper surface of the baby- supporting body and cause one or more subsets of light sources to provide electromagnetic radiation, in response to the determination that the babys eyes are directed away from the upper surface of the baby-supporting body. The method for control of the light sources of the phototherapy system comprises the steps provided by system operation. In the second embodiment of the system, it comprises means for baby support, means for generation of one or more output signals transmitting information related to the baby position on the upper surface of the baby support means, means for emission of electromagnetic radiation through the upper surface of the baby support means, means for determin