In front of the watching Spain coach Vicente del Bosque, Bueno struck four times between the 23rd and 38th minutes to set up a 4-2 home win.
Rayo were a goal down when Bueno netted his first with a powerful header from Nacho Martinez's free-kick.
He then took advantage of sloppy work by goalkeeper Diego Marino to slot home his second with his right foot, and he completed the perfect treble by converting Lica's centre with his left.
His work was not done, however, as he smashed in a fourth from two yards after Marino had parried his initial effort.
Elsewhere, Barcelona closed the gap to Real Madrid at the top of the table to one point with a 3-1 win at Granada.
Ivan Rakitic and Luis Suarez put the visitors two goals to the good and although Fran Rico pulled one back for Granada from the penalty spot, Lionel Messi made the points safe 20 minutes from time.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.