NIGHTCAP. A glass of hot toddy or gin-sling taken before going to bed at night. When a second glass is taken, it is called "a string to tie it with."
"Come, now, Squire, before we turn in, let us tie the nightcap." -- "Sam Slick in England," ch. 3.
Could this be the origin of "tie one on"? I don't have time to check now, but I'll get back to it at nightcap time.