If you want to provide light to help prolong their egg production, you would want to turn it on say around 5 am and have it shut off around 9 am. You don't want it turning on in the middle of the night...they need their sleep just like we do!!
I recommend you look at the sunrise and sunset times in your area every month and adjust appropriately so the light come on 14 hours before sunset and shut off at sunrise or when you open the coop door... This way they return to the coop from outside with the natural sunset and they are not entering a fully lighted coop to roost for the night...
Turning on at 5AM is too late in my area during the winter and would only give them a 12 hour day, I want 14 hour days... And I don't like the idea of them returning to the coop at night for an extra few hours of light...
My laying hens lighting schedule (Chicago area) for this winter looks like this, I just worked it out the other day, I adjust my lights on the 1st and 15th of each month...
October: lights on at 4:30 (sunrise ~7:00) lights off at 7:15 --- sunset at ~6:30
October: lights on at 4:15 (sunrise ~7:15) lights off at 7:30 --- sunset at ~6:15
*** Daylight savings adjustment set clocks back 1 hour ***
November: lights on at 2:45 (sunrise ~6:30) lights off at 6:45 --- sunset at ~4:45
November: lights on at 2:15 (sunrise ~6:45) lights off at 7:00 --- sunset at ~4:15
December: lights on at 2:15 (sunrise ~7:00) lights off at 7:15 --- sunset at ~4:15
December: lights on at 2:30 (sunrise ~7:15) lights off at 7:30 --- sunset at ~4:30
January: lights on at 2:30 (sunrise ~7:15) lights off at 7:30 --- sunset at ~4:30
January: lights on at 3:00 (sunrise ~7:00) lights off at 7:15 --- sunset at ~5:00
February: lights on at 3:00 (sunrise ~7:00) lights off at 7:15 --- sunset at ~5:00
February: lights on at 3:30 (sunrise ~6:30) lights off at 6:45 --- sunset at ~5:30
Now granted hearing the roosters going wild at 2:15AM in November is a little odd, but they are still in the coop so it's muffled, and doing it this way allows me to use the natural sunset as a bedtime and return to coop for the night time while still getting a full 14 hours of light...
Off course this is only if you want full egg production and don't care about breeding irregularities on a mixed flock... I have a mixed flock, but this winter I'll probably do the lighting for everyone as most of my peas are not of breeding age and I'm not overly concerned if my Guineas kick into breeding or not next spring... But come next year I'll move breeding peas and Guineas to the 2nd story of the coop and allow natural lighting to cycle them into spring breeding... I just have a lot of remodeling and setup to do on the 2nd story of the coop this year and I doubt it will be ready for birds before winter so they will all share the first story this winter...