Maybe Mazepa was just following in the footsteps of those medieval Kievans who invited Scandinavian Rus princes from Sweden to rule over them.
Mazepa was a Russia-dependant hetman of Cossacks, a group which hardly have an analogy. They very often changed sides, choosing from Poland, Russia, even Turkey.