Poor Bernie! Thank goodness you were alert and noticed the symptoms. You are definitely a good mom!
Depending on the type of stones, your vet will recommend the food that Bernie should have. If you are uncomfortable with prescription food (which I personally use for one of my rescues who had bladder stones in the past and have never had issues with) then you might want to do a consult with a veterinary nutritionist.
Prayers for Bernie! I am sure he will be feeling much better soon!