Even with the grains in the Science Diet foods the stomach may be empty if this is happening closer to the next meal time than the previous one.
The white foamy vomit is likely foamy saliva which a dog will produce when he or she is feeling nauseous.
It is possible your dog is emptying the stomach out prior to the next meal and there is something causing some nausea leading to the foamy vomit/spitting up.
What that 'something' might be ranges from intestinal parasites (normally only microscopic eggs are seen in the stool when a vet does testing), a swallowed non food item that won't pass out of the stomach through the pyloric valve (metal objects for example may stick to the stomach walls), or there may be an issue with a small ulcer perhaps from a helicobacter infection, or the liver or pancreas or gallbladder may be causing some nausea.
Some parasites pass through the lungs on the way to the stomach triggering gagging and spitting up in some cases.
Another possibility with the snoring and the heavier breathing is he may have an irritation of the tonsils or the soft palate which could make him gag and spit up foam.
As Sally suggested maybe he needs to get 'lunch' to help with this or maybe Pepcid AC will help. You can read about pepcid use here
(close any pop ups and scroll down the page to read about this medication and dosing etc)
Even though he is on a sensitive stomach type diet many of those contain foods that dogs find irritating. You might want to sew how he does with a food that has no ingredients in common with anything you have fed him. Fish and potato, venison, rabbit, kangaroo are some of the types of diets available. You have to read the fine print ingredients to make sure they are not 'hiding' something that might be a problem.
Easiest thing to check is to start with just bringing the vet a fresh stool sample to check for parasite eggs. You don't even need to do an appointment just ask them to run a sample and its usually pretty inexpensive.
If you get nothing from that then you may want to do a check up again. Compare current blood work to last time perhaps or consider an x-ray of the abdomen to look for pancreas, liver, gall bladder issues or maybe even a rock or coin in the stomach.
(I sure was surprised when pennies showed up in the x-ray of the stomach of one of my dogs - I still have no idea where she got them!)
Then too you might want the throat checked. Throat irritation can cause gagging, and vomiting up of foamy saliva that is created in response to the irritation.
If all is fine still then maybe a different diet will work to resolve this.Dogs can develop sensitivities to foods they always eat so that might be the problem.
Hope this helps you!