I saw this article in NY Times about Magnesium and sleep.
It ended that problem for me. You don’t need to consume it often or in any specific form. But it helps with this kind of sleeplessness.
Edit: Corrected link - here it is in long form: https://www.nytimes.com/2021/08/31/well/mind/magnesium-supplements-for-sleep.html?smid=nytcore-ios-share&referringSource=articleShare&sgrp=c-cb&ngrp=mnp&pvid=C5DB8121-ABC4-410F-BB31-F4468F62120C