How it works
Literally this says “the stomach emptied.” が (subject) points out the subject (お腹 (stomach)), and the verb 空く (become empty) shifts to plain past 空いた (emptied). Japanese describes hunger as a thing that happened to your stomach, not as “I am hungry.”