It can be an allergy to the food or many other things..Did it get into a houseplant and eat any part of leaves? Did it eat anything outside that it shouldn't? Take it to the vet and he can give some meds to help and also they can give special dog food to help until it is normal again.