everyone is different, but i don't take mine after 4-4:30 otherwise i'll be up half the night... even if i take one at 1 or 2 i see some effect on my sleep... but i'm super sensitive to caffine..
eating may only just serve to reduce the effects of the eca, but probably not that much... you may be better off with a low carb shake rather than a bar that close to your workout... (well, i'd personally add some carbs in there for energy, but i'm not sure of your diet)