There is no specific answer because it depends on surfaces, temps of the environment, etc., and which infection we are talking about, but generally speaking, most are just a few seconds. Some found in blood live longer on surfaces, but those would still have to get into your bloodstream, meaning you'd have to have a cut large enough for that to happen, and I don't think that's what we are talking about here.
No STD can be transmitted by sweat or sharing blankets. STDs are transmitted either by oral sex, vaginal sex, or anal sex. Some require penetration, some require direct skin to skin contact, like genital to genital skin contact.
Public lice, or crabs, may sometimes be transmitted by bed linens, but those aren't common at all anymore.
Is there a specific question you have? If you can give me more details, I can provide more specific information.