Most 7 year old children usually go to bed between 7:00 PM and 9:00 PM and a 7 year old child should be in bed at 9:00 PM at the latest.
A 7 year old needs between 9 and 12 hours of sleep so make sure the 7 year old child goes to bed early enough to allow them 9 to 12 hours of sleep when they get up in the morning.
You need to set a specific bed time for your 7 year old child and always have them go to bed at that time of night so they get used to the bed time.
That gives them time to get a bath, shower, change clothes etc and then get into bed and fall asleep.
If you don't stick to a good bed time schedule and routine then the 7 year old child's sleep pattern and sleep will be messed up.
So the 7 year old child may feel too tired as a result and not do as well in school as they would when they got the proper amount of sleep.