As I discuss in this question, during the time of Sita's Agni Pariksha, the Devas came down to the battlefield of Lanka. During that time, Indra offered Rama a boon, and Rama asked that the Vanaras who died in battle be brought back to life, as described in this chapter of the Yuddha Kanda of the Ramayana:
When Dasaratha returned, the Lord Indra, the destroyer of Paka the demon, was very much pleased and spoke to Rama, who stood there with his joined palms. "O Rama, the foremost among men! Your sight of us, should not go in vain. Therefore, tell us whatever is desired by you." Hearing the words of the great souled Indra the lord of celestials, after having been pleased, Rama with the most placid mind spoke the following words with rejoice: "O the foremost among the eloquent! O Indra! If you have affection in me, I shall speak out my words. Make my words real. Let all the monkeys, who reached the abode of death, after displaying their energy for my sake restore their life and get up. O the bestower of honour! I wish to see all those monkeys, who for my sake, were removed from their sons and wives, be delighted at heart. They were all valiant, proving their energies and did not take their death into account. They made their strenuous efforts and died. O Indra! Restore their lives to them. Those monkeys - who counted death as nothing and who were fond of doing favour to me - let them get re-united with their near and dear ones by your grace. I seek this boon of you. O bestower of honour! I wish to see the monkeys and bears, free from wounds and pains, with augmented strength and valour. Wherever the aforesaid monkeys live, let there be rivers with crystal-clear water, flowers, roots and fruits even in an off-season."
Hearing the words of that great-souled Rama, Indra the lord of celestials endowed as he was with delight, again spoke the following words: "O beloved Rama! This boon, which has been sought by you is hard to grant. No offer has, however, been revised by me in the past. Therefore this will come to be. Let all those monkeys and bears along with long-tailed monkeys, who have been killed in battle, by the demons and whose heads and arms have been severed, be alive and active again. Without any ill-health and wounds and with boosted strength and valour, the monkeys will rise again, as those fallen asleep would do at the end of their sleep. All of them, full of delight, will get re-united with their friends, relatives, kinsmen and family members. O the wielder of a great bow! The trees will look colourful with flowers and fruits even in the off-season. Rivers too will remain constantly with water." Thereupon, all those monkey-warriors got up, as if from a sleep, with all their limbs completely healed of wounds. All the monkeys felt surprised, saying to one another "What miracle is this?"