Praise be to Allaah.
It is permissible for the Muslim to wash his entire body in order to cool down if it is hot. This will give him more energy in order to perform this act of worship. He should take care when washing so that nothing falls from his hair or skin.
And Allaah is the Source of strength. May Allaah send blessings and peace upon our Prophet Muhammad and his family and companions.