I have been dealing with the exact same thing with my dog! I am so glad to have found your post as I have been at a complete loss as to what to do as well. My dog is also throwing up sometimes after an "episode", does your dog do that too? Anyway, it started after he was neutered and the vet removed his sutures since sometimes dogs can have a reaction to those, but to no avail. She advised we give him benedryl in case it is some other allergy but that didn't work either. Please keep me posted if you find out anything and I will do the same.
Thanks.