Hmm. Interesting that you would single out Electrode. Why? Isn’t it a little bizarre that any Pokémon can use Rain Dance at all? Even for a Water-type, altering weather patterns is a fairly spectacular application of power that ought to have wide-reaching ecological impacts – let alone for the frankly ridiculous array of other Pokémon that somehow have access to this thing (pretty much “everything that isn’t a Grass- or Fire-type, and some things that are”).
I’m inclined to think that you’re asking about Electrode specifically because it’s so odd to imagine Electrode ‘dancing,’ but I really don’t think this is the right question. In Japanese, Rain Dance is called Amagoi, which Bulbapedia translates as “Rain Prayer” – as far as I can tell (bearing in mind that I cannot speak or read Japanese), it seems to be a generic term for any sort of rainmaking ceremony; “Rain Dance” is really the best equivalent we have in English because it gets across the sense of ritual, of the invocation of some kind of god or spirit – in that sense I actually think it’s quite an apt translation, although it’s unfortunate that it comes packaged with those connotations of lively physical activity. Most of the other European languages into which Pokémon is translated seem to do the same thing as English – Regentanz, Danse Pluie, Χορός Βροχής, Danza lluvia and Dança da Chuva all include the word for “dance” and all have a meaning that goes back well before Pokémon, probably as a direct result of influence from the English phrase (with the odd exception of Pioggiadanza, which has the same literal meaning but, as far as I can tell, is a brand of shampoo). It probably isn’t necessary, in fact, to imagine the Pokémon dancing as they use this move – we can, and some of them very well may if they find it appropriate, but it’s likely that others chant, or pray in silence, or some combination, or something completely different. The common thread with all of them, what they’re all doing the same, is the sense of appeal to a higher power of some description. The details of how the invocation works may not be terribly relevant.
In short, the answer to your question is “the same way as everyone else!”