In the colloquial phrase sleep tight, used when parting for the night or at bedtime, the adjective tight is used as an adverb meaning soundly, i.e. deeply and without disturbance, as in the combination tight asleep.
The earliest instance of tight asleep that I have found is from the following paragraph published in The Daily Morning Post (Pittsburgh, Pennsylvania) of Tuesday 16th March 1847:
A child was “found missing” one day last week by a good mother up town. The bell was brought into requisition, the dreadful notes of which stirred up the sympathy of the neighborhood, while the lady herself chimed in most frantically. This lasted for some time—say an hour—when the poor little dear was seen emerging from beneath a bed where it had been tight asleep. “All’s well that ends well.”
The earliest occurrence of sleep tight that I have found is from the Carson Daily Appeal (Carson City, Nevada) of Sunday 17th August 1873:
Case of Gin.—Tom McWharton was up, yesterday, arraigned in Police Court for having pressed his tanzy too closely and fallen to sleep tight in a public place.
The second-earliest instance that I have found is from an article about an earthquake that had occurred in Louisville, Kentucky, published in the Daily Press and Dakotaian (Yankton, South Dakota) of Thursday 5th October 1876:
The people from the different portions of the city met each other on the street and told their experience. One was a doctor, who usually sleeps tight, unless called to see a patient. The rumbling and shaking awakened him.
The phrase often appears in the rhyming formula good night, sleep tight. There are also fanciful rhyming extensions such as good night, sleep tight, don’t let the bugs bite, as in the following from The Sportsman (London) of Friday 21st December 1888:
The Young Men’s Christian Association in New York recently undertook a task which was rather an ungrateful one. Dr. Paxton tried to reform 250 uniformed youngsters from the different district messenger companies. […] The next event on the programme was announced as a speech on personal purity by the Rev. Dr. John R. Paxton, who preaches to Jay Gould and Russell Sage. Dr. Paxton rose from his seat, and, after patiently hearing somebody ask him how he felt, and another where he had bought his necktie, said: “Boys, I’ve been through the war, but I surrender here without fighting. You’re too much for me. Good night.” “Good night, sleep tight, don’t let the bugs bite,” answered the audience with one voice, and rose to go.
Another rhyming extension appeared in the synopsis of the Entertainments to Be Provided for the Post-Dispatch’s Guests, published in the St. Louis Post-Dispatch (St. Louis, Missouri) of Sunday 23rd December 1888:
Ready for bed—“Now I lay me down to sleep”—Stockings and letters ready for Santa Claus—“Wonder if he’ll see ’em?—“Good night; sleep tight, wake bright”.
In a short story titled Ill-treating a Ghost, published in Harper’s Weekly: A Journal of Civilization (New York City, N.Y.) of Saturday 16th December 1893, by W. J. Henderson, a skipper says to the ghost whom he has found in his cabin:
“Good-night, sleep tight, an’ don’t let the rats bite.”
A Familiar Expression Illustrated.
“Good night! Sleep tight!”
—New York Journal.