If you revive a fainted Pokemon and it faints again after you revived it, Last Repects's power will increase by 50. This maxes out at 5050 base power if Pokemon have fainted 100 times in the battle. It doesn't matter how you revive the Pokemon.
Source