This is a little silly. Melatonin is an innocuous, natural substance. The sugar in the gummy bears is far more damaging to the little tykes than the melatonin.
Not the teachers decision.
They should be fired.