I would be very hesitant. My daughter had trouble sleeping, but the doctor took her off melatonin because there are concerns about its effects on girls' later fertility.
Most doctors do not recommend giving melatonin to children under 10. Allow older children to take it only occasionally, and do not give them more than 3 milligrams per day.