David Alaba, Marco Asensio and Lucas Vazquez each scored for Los Galacticos at Osasuna's home ground, El Sadar Stadium in Pamplona.
Osasuna's only goal came from Croatian forward Ante Budimir.
With this victory, league leaders Real Madrid have 78 points, 17 points ahead of second-place Atletico Madrid after 33 matches.
Ninth-place Osasuna currently have 44 points.