When it lights up, are you receiving any notifications? Certain apps have the permission to light up the screen. If you're not getting any notifications, is it on charge when it lights up? Because there's a setting called "Stay Awake" in developer options that causes the display to, well, stay awake.