If the lights are ONLY controlled manually via the Casambi app or from switches.

If you control your lights from a Casambi switch and the lights automatically turn off after about 2 hours (during the day) or 30 minutes (during the evening/night) then the reason is that Control hierarchy has been enabled and the Manual Control Timeout values are being applied to automatically deactivate the manual control (i.e. the command from the switch).

Cure: Go to the network setup, Control options screen and disable Control hierarchy

If the lights are controlled from sensors

Sensors have a linger time, which is how long the sensor waits after it stops detecting movement before it deactivates the scene it is controlling. The linger time starts as soon as the sensor stops detecting movement. If you sit still for a long time, or if your sensor is not particularly sensitive to motion, you may find the lights switch off.

Cure: Extend the linger time of the sensor.