Four minutes, eaten an hour or two before bed. Protein overnight, magnesium, and a small amount of melatonin from the cherries.

If using frozen cherries, take them out half an hour before. They release juice as they thaw, which is better than it sounds.
Most of your daily testosterone is produced during sleep, and the majority during deep sleep in the first half of the night. Anything that improves sleep is a hormonal intervention, which is why this is here rather than in a snack list.
Cherries, particularly tart varieties, contain small amounts of melatonin and have been studied for sleep quality. The effects in trials are modest, and the evidence is better than for most things marketed for sleep.
Greek yogurt is mostly casein, which digests slowly and supplies amino acids through the night. Studies on pre-sleep protein show it supports overnight muscle protein synthesis, which matters more from midlife onwards as muscle becomes harder to hold.
Walnuts add magnesium, and magnesium is one of the few supplements with reasonably consistent evidence for sleep quality.
One caution worth stating: this is a small nudge, not a treatment. If you wake at three every night, the more likely causes are alcohol, night sweats or sleep apnoea, and no snack fixes those.
More on that: how hormones hijack your sleep.