That is an odd situation, and it’s tough to diagnose. As you said, this could be caused by something lacking (too few overall calories during the day, carb choices or amounts etc.) or could just be a habit.
First, see TC’s recent article about sleep. He talks about “1st sleep” and “2nd sleep” and that these two periods are natural. We wake up in the middle of the night and it may take an hour to fall back to sleep. The trick is to know this is natural and not panic or worry, which of course releases chemicals that keep us from getting back to sleep, ironically!
So it sounds like you’re eating during this natural waking period. And it could be that the insulin bump helps you get back to sleep. Most people who start low carb diets report sleep issues, at least at first. Carbs do help. And as long as these are good carb choices and you’re making progress in your goal, then I wouldn’t sweat it, even if it’s a habit.
You could try changing up the last meal of the day, adding some complex carbs in there, maybe more casein for slower digestion, or just a nice hunk o’ meat. Then maybe get some white potatoes in that meal, which are fine for most people. (I had them last night myself for dinner.) Rice would be fine too.
Or maybe you’re “spending” more calories than you think during the day and you really are having your body say “give me nutrients” in the middle of the night. People sometimes naturally need and want more food on hard training days or when they’re recovering from those days. That’s why I distrust calorie formulas in general. The formula doesn’t know what your body needs. As long as these are good foods, maybe you just need more of them?