The Stillwell Avenue comfort station at Coney Island was locked and quiet at 4:30 a.m. Thursday.

The only sounds came from the waves lapping the beach and a flagpole creaking in the dark. A light at the top of the iconic parachute jump blinked on and off.

A man walking on the boardwalk stopped, discreetly relieving himself against the comfort station wall. A jogger and his dog passed in the opposite direction.

Then, the cleaning machines crashed by.

In a loud line they came, rake apparatuses dragged behind them. The busy vehicles were part of the fleet that does the lonely work of cleaning tons of garbage off New York City’s beaches every night.

Like being Sisyphus, but with a better view

This weekend, thousands of New Yorkers will fight the August heat by taking to city beaches. When they leave, they’ll often leave their garbage behind.

At Coney Island, it’s the job of Parks Department employees like Clarence Williams IV to clean the not-exactly-pristine sand.

“We try to clean every inch of beach,” Williams, 34, says as he drives from a compound at the west end of the beach down to the east end at Brighton 15th, where the five rakes on duty that morning will begin working their way back.

Most nights, a crew begins the cleanup around 9:30 p.m., Williams says, and the next crew comes to finish things up starting at 6 a.m. But on Wednesdays and Thursdays, it’s just the morning crew, who start around 4 to have the beach ready at opening time: 10 a.m.

So work starts in the dark, with the rakes driving in Zamboni-like ovals. The lead operator starts with his or her tire at the edge of the boardwalk. The next vehicle places one tire in the left-most track, and so on down the diagonal flank.

The rakes dig 4 to 6 inches into the sand, Williams says, pulling in all the things humans leave behind: containers of food, lots of garbage from Nathan's Famous, Corona bottles. Also jewelry and cell phones, which often come through the machinery unscathed, Williams says — just a little wet. He tries to contact owners if the phones aren't dead.

Williams, a supervisor born and still living in Bedford-Stuyvesant, did various beach cleaning jobs as he rose to his position. Now, he drives a “six-yard beach wagon” that collects trash from the rakes. His truck holds six cubic yards — when it’s full, he’ll transfer the waste into sanitation containers with space for 30 cubic yards.

On a busy day, he fills up to eight of those containers; a slow day, one or two. On Thursday morning, he only needed one.

Weekends tend to be heavier days, given beach attendance. One July 4th, Williams says they carted off 14 big containers — more than 400 cubic yards of trash, which would overflow a large 2-bedroom apartment.

The secret life of a beach

But there are other things to see on the dark nighttime beach besides garbage.

Sea turtles, for example — one washed up on shore this year, injured but alive. Last year, there was a dead whale.

There is also human activity, even in the dead hours of the night: your average canoodling couples — "they love the lifeguard chairs," Williams says. Plus fishermen, swimmers and morning walkers and runners.

At 5:30 a.m., with the sun still a half hour away, a middle-aged man in tight spandex and carrying a pink towel over his shoulder walks calmly past Williams’ truck toward the ocean. Soon after, a jogger waves at a swimmer. Williams says the jogger is a regular.

As the sun rises, Williams drives by a man and woman on their knees facing the water, eyes closed and holding a basket of flowers toward the waves. Williams says he’s seen baptisms and other religious ceremonies in the early mornings, as well as people taking wedding photos on the still-pristine beach.

The density of trash — heaviest by Brighton and in front of the amusement park — reveals the patterns of beachgoers the day before. A clean stretch in front of the aquarium is often empty because there are few boardwalk entrances, and another stretch bordering up against Seagate’s private beach is far from trains and also quieter.

Williams says he sometimes visits during daylight hours, though not often.

“I have enough beach time,” he says. Pointing at his shoes: “I take sand home with me every day.”

And he does get some prime hours, before the hordes descend — anywhere from 20,000 to 40,000 people visit the beach in good weather when he does a count around 11 a.m.

Williams says beachgoers in the morning are often surprised. The freshly manicured vista doesn't match their conceptions about the famed and crowded public beach.

They repeat the same thing, Williams says: “It’s clean.”

This is amExpress, the conversation starter for New Yorkers. Subscribe at amny.com/amexpress.