New Yorkers aren’t the most depressed people in the country, but their lack of sleep and exercise is putting a major dent in the city’s overall happiness, a study has found.

The Big Apple placed a crummy 70th in a ranking of the 150 happiest places to live in the United States released Monday by the personal financial website WalletHub.

Jill Gonzalez, an analyst for the site, said the study aggregated data from 2015 reports from the Census and the Centers for Disease Control and Prevention and coupled them with newer studies provided by the entertainment and travel sites Yelp and TripAdvisor.

The factors fed into the report included data on income, exercise, sleep patterns and natural attractions.

“New York ranked pretty poorly,” she said. “We’ve done state rankings on happiness before, but this is the first time we ran the numbers for the country. It’s surprising to see that the city that never sleeps is pretty depressed.”

She said the study was divided into three categories: emotional and physical well-being; income and employment; and community and environment.

New York scored low across all three, Gonzalez said, mainly because of CDC statistics that showed its denizens suffering from sleep deprivation and a lack of exercise.

“The CDC has New York’s inadequate sleep rate at 130 out of the 150 cities,” she said, adding that 71 percent of adults in the Big Apple also said they didn’t get regular physical activity.

“Sleep and exercise — those are big deals,” Gonzalez said.

Why New Yorkers haven’t collectively jumped out their windows, however, might be all the great entertainment in the city.

Based on the data from TripAdvisor, New York scored at the top for city attractions.

“The attractions are helping to bring up the happiness level,” Gonzalez said. “Without it, New York would have ranked lower by about three points.”

Not surprisingly, sunny Fremont, Calif., came in first place, while Detroit came in last.