Nadal’s home town of Majorca has been hit by devastating floods which has killed at least 10 people.
The Spaniard is recovering from a knee injury but he has still spent time helping residents clear the water and debris from local villages, along with opening the facilities of his academy for victims of the rainfall.
Federer and Djokovic are competing at the Shanghai Masters this week and are both in quarter-final action on Friday.
But ahead of their respective ties, the pair have sent Nadal their support to get him through the difficult period.
“I heard about the devastating news, the floods in Majorca, and I want to send my condolences to everyone who lost close people in their life, family members, friends,” Djokovic said.
“I want to send my best wishes, strength and good energy to everyone. To go through this I can only imagine how difficult it is.
“Especially for the people who have been in the epicentre of everything. I want to send a big hug and a friendly regard to Rafa Nadal and well done amigo for helping out.
“I want to invite anyone who is following the news in Majorca to support in any way they can.”
Federer also offered a helping hand to his rival.
“Hello to all the people in Majorca,” Federer said.
“I am very sorry about the news and I know how important Majorca is to Rafa.
“I have been in touch with him and I have seen if I can help with anything.
“I have seen Rafa helping around the villages where he comes from and it is nice to see and very inspiring.
“You have our support. Rafa, we think of everybody in Majorca and we wish you a lot of strength in these difficult times.
“I hope to be back to Majorca soon at some point.
“I just want to send all my best wishes here from Shanghai to all the people in Majorca.”