Riki had given the visitors a shock lead on 15 minutes but Real were level seven minutes later when Cristiano Ronaldo scored from the penalty spot after Manuel Pablo had brought down Angel Di Maria.
And the hosts were in cruise control by half-time as Di Maria and Ronaldo nodded in from close range just before the break.
Pepe headed in the fourth 25 minutes from time following Xabi Alonso's free-kick, before Ronaldo completed his hat-trick with another penalty after Evaldo had been harshly adjudged to have handled Kaka's cross
Real No2 Aitor Karanka said: "Right now these are the points that the teams have and what we have to do is focus on our own, play our matches and take the points. Right now we just have to think about the match in Amsterdam and the one on Saturday will come along on its own. We want to keep improving, growing and winning matches."