After years of tossing and turning, and lying awake worrying about everything from Hillary Clinton’s email to Donald Trump’s hair and how I’ll pay for retirement, I finally found the secret to a good night’s sleep. And it’s not pills.

My daughter insists she sleeps like a baby because she has a fan blowing in her bedroom at night. “White noise” works magic, she says. I suppose anyone who uses a fan even in the winter must know what she’s talking about or needs counseling.

Through extensive scientific research on Wikipedia, I discovered that “white noise,” as opposed to general all-purpose barroom brawl noise, consists of relaxing sounds of ethereal frequencies that make you want to fall asleep … even when your spouse is in a romantic mood or the neighbor’s kids are having a pot party. It’s a sleep inducement more effective than a double martini or reading the entire Congressional Record of the Affordable Care Act.

White noise will help you overcome insomnia, anxiety, tinnitus, hypertension and that thing known as “agita.” Best of all, it blocks out irritating sounds like your neighbor’s yappy Jack Russell Terrier and the baby bawling in the next-door apartment for his late-night feeding.

I’m certainly familiar with regular, garden-variety noise because I grew up in an Italian family, where we yelled at one another even when we agreed. The neighbors always thought we were arguing because we communicated in decibel levels generally associated with a Lady Gaga concert.

For most of my life, I’ve had difficulty sleeping, except when I was in college and solved the problem by partying all night long. Nowadays, young people prefer not to sleep, so they put their cell phones under the pillow and wait for someone to text-message them at 2 a.m.  

My parents had a unique strategy — they kept the TV on all night and slept like rocks, while the rest of us lay awake swearing, staring at the ceiling and listening to reruns of Lassie andRin Tin Tin. This, of course, was back when television was relaxing and wholesome, and you didn’t have to watch inane stuff like Real Housewives, Real O’Neals and the Real World, back before people were regularly getting dismembered and raped on Game of Thrones.

My wife uses a similar technique and has Downton Abbey on her DVD player all night. She sleeps soundly while I lie awake, worrying about what’s going to happen to Lady Mary. By now, I know every plotline and subplot from Season One to Season Six.

However, I have to wonder why she likes to listen to the antics on Downton Abbey, but can’t listen to my snoring, which, I’m convinced, is more effective than white noise. Maybe she’d change her attitude if I snored with a British accent.

For my part, I use my iPad to produce the sounds of waterfalls, wind, rain, thunder, crashing waves and slot machines, which if you put them all together sound somewhat like Foxwoods Casino during Super Storm Sandy.

Other times, I’ll listen to Gregorian chant, which is so inspirational that I wake up refreshed and eager to join a Trappist monastery, where I can launch a second career making jellies and fruit cakes while praying the rosary.

Some people prefer city noises, such as police sirens, garbage collection and the pandemonium at Yankee stadium during the playoffs, but that doesn’t work for me because I fancy myself more of a Henry David Thoreau than a Rudy Giuliani.

Last Christmas, my wife bought me a high-tech noise machine from Brookstone, which produced a variety of sounds. It didn’t help, though, because the noise was so nerve-wracking I had nightmares that I was working on either the KIA assembly line or the drive-up window of Popeyes, serving Cajun chicken.

The machine also produced sci-fi sounds that resembled an alien space ship landing in our back yard. Unfortunately, it made me anxious, and I kept waking up terrified that creatures with tentacles and large watery eyes were going to abduct me and take me to Popeyes on Planet X, where they’d serve me in the Cajun wrap.

At that point, I decided using a fan was the best way to go, except on the really cold nights when I have to sleep with a wool hat on my bald head so I don’t get sick and stay up all night sneezing.

Contact Joe Pisani at [email protected]