Most women describe the same shape. Sleep comes easily. Then somewhere between two and four in the morning you are awake, warm, and completely alert, and the next two hours are spent doing arithmetic about how tired tomorrow will be.
That shape matters, because it is the part that points at hormones rather than at insomnia. Difficulty falling asleep and difficulty staying asleep are different problems with different causes and different treatments.
What is actually happening
Progesterone rises after ovulation and has a genuinely sedative effect. In the years before periods stop, ovulation becomes unreliable, so progesterone becomes unreliable with it. The cycles where you ovulate late or not at all are frequently the weeks where sleep falls apart, which is why the problem often feels random rather than steady.
Oestrogen has a separate job. It helps regulate the narrow temperature band your body will tolerate before it triggers a correction. As oestrogen falls, that band narrows, and a small rise in core temperature that would once have gone unnoticed now triggers a full response: vasodilation, sweating, and a jolt of noradrenaline that wakes you.
The part worth saying plainly
Nothing about this means you have to accept it for the next eight years. Sleep is one of the more treatable parts of this transition, and it is also one of the least raised, because it does not sound like a medical complaint. It sounds like a complaint about being tired.
It is worth raising anyway.