Hello and welcome to COL.
The fireworks may well have upset your little man, could you move him at night for a couple of nights and see if that helps, then you will know if he is associating going to bed with stress....or not. have you tried something to ease his diarrhoea, like Prokolin for example.
Could he have picked something up with the sand?
Chicken upsets my dogs, at any time so I usually give them either fish or turkey instead - maybe worth a go.
I would keep an eye on the situation and if it continues or gets worse, vet advice may be worth considering, to make sure there are no underlying causes.
Hope he is feeling better very soon