Can your period stop from not eating?

Hi guys, this might be a stupid question so I apologize in advance.

On Thursday I got my period and I would usually have it for approx 7 days. However, this one lasted max 4 days. I was at a music festival for 3 out of the 4 days and I have a terrible habit of not eating at them (max 2 nutri grain bars, 2 rice cakes and some pasta the whole 3 days, no water) could this be why my period ended so early? Probably a bit of a stretch but I was just wondering if anyone would know?