I have primary insomnia (which runs in my family). Why is it worst at the time of the month leading up to my menstrual period?

As above. Many female because if hormonal issues they can get depressed during menstruated period. And this can affect u sleep.
Female hormones. Before we have our periods, our female hormones - estrogen and Progesterone - drop. Less estrogen can mean less energy. Less Progesterone can mean less sleep.
Insomnia with PMS. I understand your distress of Insomnia. As per 2007 National Sleep Foundation poll, 33% of women say their sleep is disturbed during their menstrual cycles. Few days before start of the period, estrogen and progesterone levels drop. This is when many women have trouble sleeping. At your age of 41 years Stress of relationships, children, and work, can aggravate insomnia. See a Psychiatrist.