If there’s time, go to the playground or the park before you go anywhere that your kid will be required to sit or hold still—this will allow her to “run it off.”
Walk—don’t drive or stroll—to your destination, if possible. This, too, will burn off energy.
Cast a magic “freeze spell” on your child that lasts until the end of the event. Or at least until your child gets restless again—then have her cast the spell on you. Take turns.