Real Madrid smashed five goals past Rayo Vallecano to return to the top of the Spanish league after briefly being deposed by rivals Barcelona.