I haven't drunk tea or coffee for many years and avoid green tea, because it can contain more caffeine than ordinary tea. I don't eat late and avoid excessive alcohol.
Any beverage drunk after 6pm may stimulate the bladder and lead to visits to the bathroom throughout the night, particularly for older people.
We are also advised to take exercise, so that we are physically tired before bed. I've found that going to the gym and swimming later in the day may prevent sleep completely. I suspect that it may be swimming, spa, steam room and sauna that contributes to insomnia. It may be the effect of chlorine or the big heat variations in the body. I now avoid gym and swim the day before a very early start.
I don't experience the same problem when I've been digging weeds for a whole day. I wonder if there are several beneficial components of exercise, not just physical exertion. Several people have explained why they enjoy golf by demonstrating how it unhooks the brain from the treadwheel of continual thoughts. This in itself relaxes the body. I suspect digging out weeds does the same for me.
One invaluable tool I've found for relaxation is a bed of nails. This compact mat with circles of plastic spikes helps the body release tension by stimulating muscles and pressure points. I wear thin cotton clothes. After a while I'm no longer aware of the spikes and find it very comfortable. Sometimes I feel sleepy, but when I put the mat away, I'm less relaxed. I have slept on it, but prefer not to because of the risk of scratches to elbows and wrists when moving around.
As with everything else I've tried, sometimes it helps me sleep and sometimes it doesn't.