Could be two things that I know of: 1) screen time out 2) light sensor acting weird

The issue you're having is most likely related to the light sensor. When did this start happening?