Are you trying to eat it when you are not hungry? Maybe you have to move around to get your hunger bars lower?
When you make a beacon and activate an effect, the effect has a certain range. If you made a level one pyramid, then you could be up to 20 blocks away without the effect wearing off. Level two, 30. Three, 40. And finally four, with 50 blocks away. It effects any axis, even "Y." Hope that resolved your issue.
So you couldn't eat when you were hungry.