I've been meaning to report back on my experiment with giving up caffeine over the summer. I am 49 and have been struggling horribly with sleep despite being on HRT for two years, supplementing with magnesium (as well as B vitamins and vitamin D) and being careful with my diet which is low in carbs. I was drinking a few cups of green tea a day - always before noon - but I decided to see what would happen if I stopped.
The withdrawal was horrendous. I had a full week of pounding headaches and felt fluey and shaky. The insomnia that week was ridiculous. Since then, though, things have been going really well. As long as I'm not particularly stressed about something, I can usually manage at least 7 hours' sleep a night. And best of all, I don't wake up gripped with anxiety. I've even managed to reduce my estradiol (Sandrena) from 2mg to 1.5mg.
I'd definitely encourage anyone with perimenopausal sleep and/or anxiety issues to give it a go!