"I've been suffering from insomnia for a long time. I use Ramelteon, a melatonin agonist, to treat it. My doctor also prescribed eszopiclone tablets, and I occasionally take over-the-counter doxepin hydrochloride tablets myself. I've also tried traditional Chinese medicine like acupuncture and audio therapy, and I've gained some insights from these experiences.
For severe insomnia, I take doxepin hydrochloride or eszopiclone tablets, but I use them intermittently, not continuously. I do the same with Ramelteon, the melatonin agonist. I believe all medications have side effects, so I try to minimize their use, keeping it regular but intermittent.
Audio therapy comes in handy when surrounding noise makes it hard for me to fall asleep. I turn the volume down to a level where I can barely hear it, which helps me focus on the audio. (Or I use some very dull noise, like English listening practice; I never had trouble falling asleep while studying English in school, this is a joke from my student days, hahhahhahhahh.)
My mother suggested using some aromatherapy. I'm not a big fan of essential oils because the smell can be too pungent. Some inexpensive scents can be a good substitute, like orange peels after eating oranges or other similar fruit peels. You can place them by your pillow at night to help with sleep. I've tried it, and it does seem to help; it genuinely has a relaxing effect.
I also found that it's best to avoid eating at night, or at least avoid foods that promote stomach acid secretion or irritate the stomach, such as bananas, garlic, or chili peppers. If you have any stomach problems, get them treated promptly; a comfortable stomach will help you sleep better. I choose to drink an appropriate amount of water at night and avoid sugary foods, which has been very helpful for me.
Coffee has been a common beverage for me in the past two years. My personal experience is that if you're going to drink coffee, don't do it in the afternoon; try to stick to the morning. If I drink coffee in the afternoon, tonight is definitely going to be the night before confessing to the girl I love. In the afternoon, you can try some flower teas. If you know the recipes, you can also brew some teas that promote sleep; you can easily find recipes online.
Final advice: My wife's advice is to read books. Avoid looking at your phone or other electronic devices before bed. Excessive use of electronic devices will inevitably lead to eye discomfort and thus insomnia. I choose to read the Bible before bed, and it really helps. I read for at least half an hour each time. You can also read any books you like, but avoid those that might spark intense discussions.
These are my summarized experiences and advice from people around me, which I hope will be useful to you too.
May the Lord always grant us peace, strengthen us on every helpless night, comfort our wounded hearts, and save us from the ocean of suffering. I pray in the victorious name of the Lord, Amen."