I know a large number of people for whom caffeine and sugar play a large part in their pa's. But, just like in the lottery, where you don't win anything for just getting one number, a number of factors (caffeine and sugar being two important ones) add up to push you into pa.
Maybe read up on hypoglycemia on the internet and you'll see the effect of fluctuating blood sugars on emotional stability. Consider taking two standard chromium tablets daily - available in your health store - to help balance blood sugar levels. And try removing any obvious diet criminals from your routine. Balance would help though, one or two coffees is fine for most people, eight isn't; a couple of biscuits is ok, a packet isn't.
this story is an extreme example I know but it's an example nonetheless:-Someone I saw once had been a going to a sleep apnoea clinic for some time and the doctors had been unable to help. He could sleep very little, and would often wake finding himself unable to breathe. It turned out that although only in their early thirties this man spent every moment of the day nursing his sick wife. To maintain his routine his made and drank coffee around all his chores. He told me ( and swore an oath it was true) that he dank 30 cups of instant coffee every day. You can understand that his condition improved in relation to his reduced habit.