As others have noted, jet lag is very hard to prevent.
I would take the LAX flight because it leaves in the morning. You will enjoy the premium class flight more and it will be easier on your body. After the meal you can sleep if you can. I also think it's good that the flight lands during the day because it's an easier time to travel for most people.
The midnight departure to SFO can be painful. What happens if after the meal you cannot sleep? Then you will be in pain until you land and you will not have enjoyed your premium cabin at all.
A lot depends on how well you sleep on planes. I don't sleep well on planes and many people who can sleep on planes really don't sleep deeply because of the background noise, lack of humidity, and disruptions. Because of this, I think it's risky to assume I will be able to get good sleep or rest on the plane.
Trying to stay awake late to adjust to the new time or to make yourself sleepier is good in theory, but what if it doesn't work because you can't sleep on the plane? In that case, you've made the problem worse. Drugs can
help.