It's stated that the Infinite Tsukuyomi can be undone by someone who has the Rinnegan and the chakra of all the tailed beasts weaving the rat seal. But the Sage of Six Paths has them too. Why does he not do it himself?
The sage of six paths doesn't have the chakra of all the tailed beasts he had that when he was alive. And the sage was dead when kaguya was revived , he came from the afterlife through the chakra network to help the reincarnates of indra and asura .
Hagoromo Ōtsutsuki could not reverse the Infinite Tsukuyomi because he divided his power between Sasuke and Naruto
Dividing his power evenly between the two young ninja, Hagoromo gives his chakra to Naruto and Sasuke, which ultimately leads to them awakening the Six Paths Sage Mode and the Rinnegan, respectively.
Due to dividing his power between Sasuke and Naruto, Hagoromo Ōtsutsuki was required to seek the help of the Hokage to perform a summoning justu
Telling them of a powerful summoning technique that he is unable to perform now as he gave nearly all his power to Sasuke and Naruto, he instead gives instructions to the Hokage.
he called the spirits of the deceased Kage to aid him in performing a Summoning Technique to bring Team 7, the tailed beasts, and Madara back from Kaguya's Dimension.
Whether he temporarily or permanently couldn't reverse the Infinite Tsukuyomi is unclear, it goes to say if he was required to seek help in performing the summoning justu, he certainly was not strong enough to reverse the Infinite Tsukuyomi
The sage of six paths could have undone the infinite tsukuyomi himself because he was the one who gave them those powers(Naruto and Sasuke). But his objective was not only to undo the jutsu but make sure such events never happen again? How? By giving both prodigy brothers equal powers. By making sure the same conflict that has been going on between the two brothers does not occur again. The shinobi world has become peaceful because of his decision of making Naruto and Sasuke equals.