Yeah, it really depends on the child's daily habit. My son is an early bird and we live quite near to the school. There's no problem for him. Otherwise, he will be very sleepy if he studies in pm class.
In fact, I've consulted many teachers and they all said am is better for a child to study effectively and efficiently.