That's also possible. Unfortunately, having an unpredictable work schedule myself, I understand that you need to eat, and you don't always have a choice on time. My only suggestion, if you can't take a break for dinner earlier, would be to make it a lighter meal so it's not so heavy in your stomach so late at night. Then again, I have the problem that I can't sleep well if I'm hungry, so if I eat too early, I need a snack before going to sleep, but if I eat late, I sleep just fine. So, I don't think it's just a matter of eating late, but more a matter of how much you eat and if it's giving you stomach discomfort when you should be sleeping.
Having a routine an hour or two before bedtime will help too. A lot of people have problems falling asleep if their mind is too active and they are thinking of a million things and not relaxed enough to sleep. Deciding within a few hours of your bedtime that you're ready to sit down, relax, maybe read a little for pleasure instead of for work, etc., will help you unwind and prepare for sleep. Again, many of us don't have such a luxury, get home late and then spend another couple hours making dinner, cleaning, etc., and are still too wound up to get sleep. I'd say start by eliminating the afternoon espresso and see if that helps. If that's not enough, then work on other things as you can.