Fiqh-us-Sunnah Volume 3, Zakaat and Fasting, Fiqh 3.133C.
Section : Fasting, Acts That are Permissible During the Fast.
The following acts are permissible for the fasting person:
1. Pouring water over one’s self and submersing one’s self in water: Abu Bakr ibn ‘Abdurrahman reported from a number of companions that they had seen Allah’s Messenger pour water over his head while he was fasting due to thirst or extreme heat. This is related by Ahmad, Malik, and Abu Dawud with a sahih chain.
In the two Sahih of al-Bukhari and Muslim, it is related from ‘Aishah that the Prophet would rise in the morning on a fasting day and then would perform ghusl (a complete bath). If during the bath some water is swallowed unintentionally, the fast is still valid.