Los Blancos entered the match on the back of successive defeats in the league, but goals from Cristiano Ronaldo, Dani Carvajal, Gareth Bale (2) and Alvaro Morata secured all the points for Carlo Ancelotti's side.
Madrid remain third, two points behind second-place Barcelona and three behind leaders Atletico Madrid with seven matches remaining. Rayo, meanwhile, occupy 13th position, five points outside of the relegation zone.
Here, Sports Mole dissects the 90 minutes of action between the two capital rivals.
On target: 7
On target: 2
Was the result fair?
There is no question that Madrid deserved to claim all three points this evening, but 5-0 is perhaps slightly harsh on Rayo, who frustrated Los Blancos for long spells. The score remained 2-0 until the 68th minute when Bale found the back of the net and from that moment, Rayo completely collapsed. Ancelotti's side scored twice more in the latter stages, but it could have been four or five as the visitors continued to leave themselves open to the counter. Taking into account the match as a whole, however, the final scoreline is a little unjust, but Rayo only have themselves to blame for the thumping.
Los Blancos needed a fast start to proceedings following back-to-back defeats to Barcelona and Sevilla, but it did not quite happen in the first period. They led at the break courtesy of a strike from Ronaldo, but Rayo also had opportunities and were comfortable until the latter third of the contest when Madrid ran riot. It was not a vintage performance from Los Blancos, but they scored five times and kept a clean sheet, which suggests that talk of a slump in form was an over-reaction. Madrid have played far better this season, but in Bale and Ronaldo, always had too much pace and quality in the final third for a Rayo team that continued to push high up the pitch until the final minute at the Bernabeu.
Rayo entered the match full of confidence following four wins and a draw from their last five in the league, but they took a bit of a mauling this evening at the Bernabeu. The final score does not tell the full story, however, with the capital outfit more than a match for their rivals for two thirds of the contest. Despite their struggles this season, there is no question that Rayo play some of the best football in the division due to their domination of the ball. However, their willingness to commit players forward proved to be their undoing this evening as Los Blancos continued to counter in the latter stages. Rayo only play one way - on the front foot - but it is not a tactic that can be used at grounds such as the Bernabeu. That said, a stunning recent run of form has moved them clear of the drop zone and Paco Jemez will ensure that his side move on quickly from this evening.
Sports Mole's man of the match
Gareth Bale: Bale took his tally to 16 goals in all competitions for Madrid with a brace this evening. It also means that the Welshman has scored 12 times in 23 league games for Los Blancos, which is a very solid return for his first season in Spanish football. Rayo just could not deal with the attacker's pace at the Bernabeu and on another night, he might have had four or five in the Spanish capital.
Bale might have scored twice for Los Blancos and indeed picked up Sports Mole's man-of-the-match award this evening, but he had a real comedy moment in the first period after breaking through on goal. The 24-year-old showed stunning pace and skill to break free of the Rayo defence before preparing to pull the trigger, but the attacker tripped over his own feet at the vital moment. It mattered little in terms of the final result, but it was not a moment that will be fondly remembered by the Welshman.
Despite the end-to-end nature of the contest this evening, referee Carlos Delgado was hardly seen. The Spanish official issued just the one yellow card throughout the 90 minutes, with Carvajal booked for Madrid in the second period. It was a match that passed without major incident and Delgado was not present for long spells, which is always a good sign for a referee.
Madrid: Los Blancos are in Champions League quarter-final action on Wednesday as the Spanish outfit welcome Borussia Dortmund to the Bernabeu for the first leg.
Rayo: Jemez's side return to La Liga action next Saturday evening with a home clash against Celta Vigo.