I always assumed it was Rey who triggers R2’s wake.
Here’s another plothole for episode 4: if Leia knew they had a tracking device on the Millenium Falcon, why did they go straight to the rebel base? Why not go to some moon, rendez vous with some rebels and use the MF as a lure later on.