Alcohol is the original nightcap, and for obvious reasons. It’s actually proven to help most people fall asleep. As Verma explains, it’s pretty effective, but only in the short term:
Alcohol shortens the time to fall asleep and arousal threshold changes (while under the influence little noises don’t wake you up). It wears off in the middle of the night so your arousal threshold changes. This is bad because little noises and things wake you up more and the second half of sleep is pretty low quality.