Gut health is important for brain health and has been implicated in insomnia in several studies now.
[example of such a study](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6290721/)
Get some probiotic in your diet, for example drink some kefir every day or make your own.