Turtles can sleep with the light on, but they prefer darkness.
While turtles can sleep in any light conditions, they are more likely to sleep soundly in darkness. This is because their natural instinct is to sleep during the night when it's dark. The light can disrupt their sleep cycle and make them feel less comfortable.
If you have a pet turtle, it's best to provide them with a dark, quiet place to sleep. You can do this by covering their tank with a blanket or towel at night.
However, if your turtle is used to sleeping with the light on, it's unlikely to cause them any harm. They may just be less likely to fall asleep as deeply.
It's important to remember that turtles are nocturnal animals, so they are more active at night. If you notice your turtle is more active during the day, it may be a sign that they are not getting enough sleep.
If you are concerned about your turtle's sleep habits, it's always best to consult with a veterinarian.