In my experience it is salty or spicy foods that do that. I've recently solved the problem of a student who could play some weeks but not others; when I investigated what she did before her lesson I found that some weeks she ate a packet of crisps. I suggested she left crisp eating until after her lesson, and the problem was solved.
I would discourage you from eating sugary foods and then playing your flute for a different reason. The sugar in your saliva will get on to the pads and cause them to stick. Try drinking a glass of water before you play, or clean your teeth if you are able.