I have periods of not sleeping. I discovered, far too recently, I wish I'd know years ago, that high blood sugars mean people with diabetes lose more magnesium in their urine more than other people, so there is a potential for diabetes to cause low magnesium. Magnesium is very important for good sleep.
Not getting to sleep until 4 am is a bit of a problem. I wake up quite frequently at night, check my blood sugar, and then get back to sleep. I started using freestyle libre, and that disrupted my sleep quite a bit, it's getting back under control, but I think my subconscious mind knew my blood sugar was going to go high in the night, and wanted to correct it, because a flatter daily graph just looks so much nicer. So I started waking more easily, and not sleeping properly.
There isn't anything hidden in the back of your mind like a fear of a hypo, that is disrupting sleep, is there?
That's the only two things I can think of, maybe someone else has some better ideas.