To quote myself from a similar thread:
Melatonin: First line with great risk:reward ratio, often at least partially effective, and incredibly safe and virtually impossible to overdose on (therapuetic index >>10,000). Slightly finicky to use because of chronotropic effects, so I typically use scheduled rather than PRN. Sometimes use ramelteon but usually due to insurance/cost issues
Sympatholytics: Very effective, especially when etiology of insomnia is hyperarousal (e.g. anxiety, PTSD), usually well tolerated but effects on BP can be limiting in elderly. Alpha-1 antagonism (i.e. prazosin) is most within the beaten path, alpha-2 agonism (e.g. clonidine, guanfacine) seems to be more powerful and treats some non-psychiatric contributors to insomnia (e.g. pain). Use beta-blockers (e.g. propranolol) less frequently, but they are also option.
Antihistamines: Other mainstay, usually effective and well tolerated, have added benefit of being easy to also use as PRNs for anxiety. Need to be wary of anticholinergic effects. My other concern with them is that most have very long half-lives, which means that daytime side effects are more likely as is development of tolerance, e.g. one dose of mirtazapine 15 mg will have enough H1 occupancy for continuous soporific effect for days and days.
Anticholinergics: Sometimes in select patients (i.e. young), in large part because diphenhydramine has one of the shorter half lives among antihistamines.
5-HT2 Antagonists: There aren't any "pure" 5HT2 antagonists as far as I'm aware. For example, trazodone also is avid for alpha-1, and to a lesser degree H1. Cyproheptadine is a much, much more potent 5-HT2 antagonist but is also a very, very avid H1 antagonist, and has the same order of magnitude Ki for muscarininc receptors as 5HT2. Notably, they both have ~8 hour half life which is a point in their favor. I use trazodone quit a bit with good efficacy and tolerability (usually start at 25-50 mg and titrate to effect). Cyproheptadine should be great for sleep but I haven't really used it much at all.
Orexin antagonists: Have considered multiple times but ultimately cost is prohibitive.
Misc: Gabapentin and D2 antagonists can be useful for sedating effects, although risk:reward is usually less favorable