As long as you complete the course during the permit or intermediate license phase, you are fine. (myimprov.com)
Drivers with intermediate licenses may not drive between midnight and 6:00 a.m. and may only have one other unrelated passenger under age 20 at a time. (grayandwhitelaw.com)
You can take the online course at any time in the morning, noon or night... as long as it's during the permit or intermediate license phase. (myimprov.com)