Can there be a teacher who has NOT dealt with this? lol. I do lots of playing "with" them. Some very intelligent talented students get easily stimulated and want to "take off" with that energy. I show them a note that "matches" what I'm playing and then have them choose the tempo, volume, rhythm by just playing the note however they want. As I respond with accompaniment they get the satisfaction they crave in playing the piano. Then I add notes they can play as they are ready. So then I shamelessly bargain with them. "If you do this one thing, then we'll play together ok?" It works. When they get out of control it's good to change the subject. The theory books with little things for them to write are calming. In addition, I give them music paper (tell mom how to get free music paper on line) and have them make whole notes on the staff anywhere they want. I then play it for them. Gits 'm every time. A few doses of silliness, sprinkled in with real knowledge is how we learned from our parents is wee ones. And yes they do settle down but not forever, that characteristic will crop up from time to time again. And then you can just let them float with the material you have worked on. Kids are so exhausted these days from the traditional school model that I'm finding in increasingly important to teach music alltogether differently than what they have experienced all day for 6 hours.