Old style beds in Europe and the Americas had mattresses that had to be tightened. Tense cords would pack straw used to soften the mattress. If the cords weren’t tense, then insects would infest the straw.
So in olden days, people would tighten the cords of their mattresses before they slept on the mattresses. If they didn’t, insects in the mattress would bite them.
I am not sure whether all these insects were precisely bed bugs as scientists define them today. I don’t believe all of them were even true bugs (i.e., Hemiptera). However, they were annoying little insects (bugs) that lived in the bed. Whatever species they were, some of this vermin bit humans.
Hence, the wise person ‘slept tight’ so the ‘bed bugs’ wouldn’t bite.