Pellegrini made four changes to his starting line-up from Sunday's 2-0 win over Getafe but it was business as usual with Villarreal recording their fourth consecutive win thanks to second-half goals from Nihat Kahveci and Guille Franco.
"It was a risk to play with several men who did not play on Sunday knowing how tough this game would be. We took a risk and it came out well for us," said Pellegrini, whose side play Espanyol and Deportivo La Coruna in their final two matches.
And with Barcelona losing at champions Real Madrid later on Wednesday, that win for Villarreal guaranteed Pellegrini's troops a place in the top two for the first time ever.
"As well as that, for next Sunday's game, we will now have several players available who are rested."