Foye struck for 17 points and Hayward added 15 as the Jazz got back on the winning track following four straight losses.
The 76ers got 19 points off the bench from Dorell Wright but still fell to 1-3 on a four-game western road trip.
Arnett Moultrie and Spencer Hawes each added 14 points in the loss.
Susan Sarandon 'very excited' about daughter's pregnancy
Scarlett Johansson steps out with fiance after pregnancy reveal