Dorlan Pabon came close to giving the home side the lead inside the opening 15 minutes with a powerful effort from close range, but Ruben was able to hold onto the ball.
The visitors had a strong spell of possession midway through the first half, but were only able to create the one chance, which Joaquin Larrivey smashed high and wide.
Jeremy Mathieu played in Jonas shortly before half time, and the striker initially hit his effort directly at Ruben, but the Vallecano keeper could not stop his second strike.
Rayo continued to press, creating numerous chances throughout the second half, but rarely troubled Alves.
The result leaves Valencia sixth in the table.