According to Micheal Arndt it was something BB-8 said to R2 that woke him up.
“…but the idea was that in that scene where R2 plugged in, he downloaded the archives of the Empire, which was referenced by Kylo Ren,” Abrams said. Thirty-eight years later, in both our own and galactic time, that data becomes useful in The Force Awakens when a new droid approaches the dormant R2.
“BB-8 comes up and says something to him, which is basically, ‘I’ve got this piece of a map, do you happen to have the rest?’” Abrams said. “The idea was, R2 who has been all over the galaxy, is still in his coma, but he hears this. And it triggers something that would ultimately wake him up.”
I thought it had something to do with either Rey or the saber returning. Didn’t BB-8 communicate that he had part of the map to R2 earlier and nothing happened? Then when Rey shows up he powers up almost immediately.