Any big hotels have got scandals. Just like every big hotel has got a ghost. Why? Hell, people come and go. — “The Shining” by Stephen King

The most memorable guest Jacob Tomsky ever came across in his 10 years at a three-star hotel in the city was an older man who checked in week after week, came and went, and never spoke. “Mr. Hockstein,” as Tomsky calls him, also carried hardly any luggage — not typical of their usual upscale clientele — and had his weekly bill faxed to his secretary, who always paid promptly.

Tomsky was fascinated. So was the rest of the hotel staff. They could never figure out what Hockstein was up to — until one Thursday afternoon, when one of the laundry guys came across a shopping bag in Hockstein’s room.

You probably know where this is going.

At the same moment the staff was going nuts over Hockstein’s stash — sex toys, dildos, a blow-up doll — the guest himself walked through the door. He went up to his room, then came back down to the lobby, ready to speak for the first time in years.

“WHERE ARE MY PERSONAL ITEMS? WHY HAVE THEY BEEN REMOVED FROM MY ROOM?”

It was the kind of moment, the kind of guest and the kind of hysteria in which hotel staffers — otherwise rendered catatonic by the mind-crushing tedium of their jobs — find deep, mean pleasure.

This guy was Tomsky’s to handle. He remembers Hockstein standing there, seething, grinding his teeth.

“Well, sir,” Tomsky said, “perhaps the housekeeper assumed you had departed and was attempting to save you from accruing tonight’s unneeded room and tax.”

This did not please Hockstein, who was unaware of the two male staffers across the lobby miming a sex act that involved an umbrella.

“I stay every week until Friday, and I keep my suits at my office,” Hockstein said. “Where are the items I left in my room?”

“I apologize again, sir,” Tomsky replied. Then he got an idea. “If you’ll provide me with a detailed list of the bag’s contents, sir, we will replace the items within the hour.”

The guest settled down and assured Tomsky the gesture was unnecessary. He also threatened to find a new hotel. He never did.

As for the blow-up doll, she found a new home: The staff cleaned her up, outfitted her in a housekeeper’s uniform and propped her up in a storage closet on the 10th floor. As for Hockstein, “he assumed we never found out.”

According to Tomsky, this anecdote illustrates the essential, immovable truth about hotels: “Everyone knows everything.” And, one year after he quit the industry, he’s happy to explain how and why.

You may never truly relax in a hotel again.

‘Heads in Beds: A Reckless Memoir of Hotels, Hustlers and So-Called Hospitality” (Doubleday) is Tomsky’s memoir of his 11 years in the industry — first at a luxury hotel in New Orleans for one year, the rest in a high-end hotel on Manhattan’s Upper West Side. Which, by the way, wasn’t as upscale as it looked — the finishings and materials were cheap, with shower handles often breaking off in guests’ hands. Mirrors fell off walls and broke apart. Even the staff’s uniforms were tearing after just a month of wear.

“Everything was a facade,” he writes.

He’s seen it all, and his book is meant to be to hotels what “Kitchen Confidential” was to the restaurant industry: a sometimes gross, often hilarious exposé of unethical practices combined with sympathetic tips for you, the poor, hapless consumer.

And the state of affairs has only gotten worse in the years since hotels replaced nightclubs as the city’s most glamorous destinations: the Mercer, the Standard, the Jane, the Ace, the Bowery, the Maritime, the Gansevoort, 60 Thompson, the Hudson, the Gramercy Park Hotel, the Wythe — all are competing for ever-fracturing subsets of the young and the beautiful.

“This is the same customer that doesn’t want to eat at a chain restaurant,” says Eric Goode, a night-life impresario (Area, B Bar) turned hotelier (the Maritime, the Bowery). Goode says the key to all of these hotels is the right social component — an exclusive bar, club or restaurant built-in — along with a sense of decadence.

“People in hotels want to be mischievous,” he says. “You have to walk a fine line.”

In fact, Tomsky says, the night-life and hotel industries have much in common: absurd markups, an emphasis on snob appeal versus service, and stressed staffers who end up hooked on drugs and booze.

“I’ve worked longer shifts than you can imagine,” he says. He once did more than 24 hours at the front desk, on his feet all day, forbidden — as most staffers at high-end hotels are — from surfing the Web, making personal phone calls, texting, or chatting with his colleagues. He wasn’t even allowed to stand within five feet of a co-worker — fraternization on duty is forbidden. Staffers must be ever-alert for a guest in need.

“I’ve worked a month straight without a day off,” he says. He can’t begin to describe “the mind-numbing boredom of an overnight shift.”

And this is where you, the unwitting hotel guest, come in. You are the comic relief for the hotel staff: When you go out, they go into your room and rifle through your stuff. They steal from your minibar. They sniff your underwear, examine your toiletries, read your notes and faxes.

Stealing, Tomsky says, rarely, if ever, happens. It’s more about voyeurism than anything.

“I found a pretty foul letter left in a room,” he says. “It was about someone’s wife being a whore. It was probably a joke, because there was a stamp on it of genitalia, addressed to a Mr. Cuckold, with details about her sexual activities.”

As time-killers go, though, Tomsky says the thrill soon wears off.

“You go into your first room and you see panties and condoms in a box, and it’s like, ‘Wow!’ But after your first month, it becomes very standard, and, honestly, you’d rather not. You know it’s not going to be interesting.”

When not screwing with guests, staffers will often use vacant rooms to have sex — sometimes, just an hour or so before you check in. Chances are it happened on top of the bed you’re sleeping in, and chances are they never called housekeeping before you arrived.

Also: That duvet? Never remove the cover. That, at least, gets cleaned occasionally, but the duvet itself? Never. All of your drinking glasses have been cleaned not with soap and water but furniture polish — it really makes them sparkle. And if you’ve been having trouble accessing your room with your key card, it means you’ve pissed off someone at the desk, and they’ll re-activate your key card when they see fit. (It’s called “key-bombing.”)

Other methods of revenge range from the juvenile — your toothbrush, Tomsky assures, is something a demanding guest should know has been fouled — to the stealth. If you are checking in and causing a scene — or simply being rude — you will find yourself in a lousy room.

“You probably could have had a really nice suite,” Tomsky says. “And you’ll never know it. I became the master of instant karma. And if I saw a Black AmEx — watch out.”

The wealthier the guests, Tomsky says, the more likely they were to be loudly and wildly abusive.

“A lot of people are watching ‘Downton Abbey’ now, and they think, ‘Oh, I’ve got servants, too!’ ” he says. “Especially the affluent. They treat people as they never would otherwise. Meanwhile, hardworking people — who might be getting screwed — won’t say anything. It’s the people who have way more money who want everything now, and they want it for free.”

Celebrities, he says, are often the worst. “They’re the ones who push the envelope the hardest,” Tomsky says. For legal reasons, he can’t name names, but he writes about the actor who requested five bowls for cereal along with prescription pills and a voodoo doctor. The actress who faxed her significant other images of stains — faxes that came so frequently the staff finally installed a machine in the guest’s room. There were the rock bands who demanded their rooms be blacked out and did the de rigueur breaking of furniture and flat-screens. There was the professional golfer who sexually assaulted female staffers in the hallway — all caught on video. He was kicked out and banned for life.

“If you can imagine it happening in a hotel,” Tomsky says, “it’s happened in a hotel.”

It’s an understandable phenomenon: The entire hotel experience is designed to make you, the guest, feel as though you should want for nothing. The suspension of reality, the self-contained ecosystem, the anonymity not just of the guests but between the guests and staffers themselves — it all contributes to one giant unleashing of the id.

Tomsky says the restaurant industry subscribes to the same theory. “I’ve heard it said that there’s something primal about breaking bread — that it makes you baser,” he says. He himself confesses to making a midnight call to one awful guest. Tomsky was out partying, drunk, and called from a pay phone with the intent of waking the guy up and freaking him out.

“I informed him he was an a–hole and he should sleep like s–t,” Tomsky says. And it did make him feel better. “But I got to the point where I built a wall up. I got an incredibly thick skin, and I really didn’t care.”

That’s when he knew it was time to go.

So how can you, the weary, wary traveler, protect yourself?

First, Tomsky says, never underestimate the power of sliding a $20 bill across the check-in counter along with your credit card. “Some people feel nervous about this move,” he writes. “Please don’t. It’s not a drug deal.”

It’s nearly guaranteed to get you an upgrade, or free cocktail, or other considerations on checkout.

Speaking of: No matter how many movies you order or bottles you swig from the minibar, always dispute the charges.

Tomsky says there are so many ways for the hotel to miscalculate that they’ll usually strike it all from your bill. (They are also factoring in employee malfeasance.)

Most importantly, he says: When dealing with any member of the staff, be nice. Make eye contact. Remember names. Say “please” and “thank you.”

“There’s nothing better than giving someone a great stay just because you like them,” Tomsky says. “Kindness really does go a long way.”