Hayes and Yeading boosted their chances of survival with a win at Forest Green.
Tom Cadmore put the visitors ahead when he shot past Sam Russell from 12 yards but Michael Uwezu equalised, shooting home following James Norwood's pass.
Hayes regained the lead only five minutes later as Michael Thalassitis calmly finished off from 15 yards after Yassin Moutaouakil's centre.
Daniel Wishart scored for the second successive game and sealed the victory with a low shot from six yards out.
Hayes and Yeading remain in the Blue Square Bet Premier relegation zone but they are now level on points with 20th-placed Lincoln City.
VIEWS FROM THE DRESSING ROOM
Forest Green Rovers manager Dave Hockaday told BBC Gloucestershire:
"I thought it was a decent performance but our goalscoring was awful. They've had two chances in the second half. I know the keeper has made a mistake (for the third goal) but he's saved us plenty of times before.
"I actually think the performance was OK, but we can't score and that's been the problem all season and we'll put that right for next season. I thought we were on top for vast spells but that's no good if you don't put the ball in the back of the net.
"One thing does worry me - we've come off the pitch at the end and there are two or three people in the stand, supposed supporters, who seem happy we've lost.
"That really upsets me."