Rock bottom was a Tuesday in June.

It was a hard month, my fifth on the night shift. I was averaging about three or four hours of sleep a day, much of it fitful and fractured by wild dreams brought on by the melatonin supplements I was taking, and I'd woken up just two hours after going to bed. Summer sunlight streamed around the edges of the blackout screens fastened to my windows.

I rolled over to look at the clock - 10 a.m. - and started doing the calculations that become second nature when you're a shift worker with an insomnia problem. I had to be at work in 11 hours. And if I wanted to get anything done at work, I had to cobble together something like a good night's - er, day's - rest right now. I closed my eyes and tried to will my body into oblivion.

But it didn't come. Or at least not when I wanted it to. The various sleep-inducing strategies I tried - soothing music, dull podcasts, yoga, meditation, chamomile tea - were only patchily effective. Prescription sleep aids left me feeling groggy and no better rested than before. When I finally did nod off, it was at midnight, at my desk, my cheek stuck to the pages of my notebook. My boss, bless him, sent me home early.

The graveyard shift at a newspaper is many marvelous things - exciting, liberating, challenging, full of bizarre stories and excellent camaraderie - but healthful is not one of them. In the 14 months I spent on The Post's Morning Mix team, working 9 p.m. to 6 a.m. five days a week, my hair fell out and my short-term memory disintegrated. I had the sleep habits of a colicky infant, waking up every few hours, and a sick baby's less-than-charming disposition to match. In the interest of honest reporting, I'll admit that at times I also cried like a baby.

If this sounds a tad pathetic - well, I can't argue with you there. On that Tuesday in June, I felt pretty pathetic.

But many of the roughly 15 million Americans who work a night shift, evening shift or other rotating schedule have probably felt the same at some point. They are security guards, firefighters, waitresses at all-night diners, emergency room staffers, managers at hotels and, yes, journalists, and we all face the same frustrating task of battling biology to stay awake when our bodies tell us not to.

For most of us, it's no easy fight.

Scientists are still sorting out exactly why animals need sleep, but it's readily apparent that we do. In the 1980s, a famous study deprived rats of sleep for 30 days - and every single one of them died prematurely. In people, short-term sleeplessness can cause blood pressure to increase and body temperature to drop; it weakens the immune response and impairs cognitive function.

Just about everything in the human body is set up to help us rest at night, starting with the eyes. A study in the early 2000s found that our eyes have specialized cells - called intrinsically photosensitive retinal ganglion cells - that alert our brain to the amount and quality of light in which we're immersed. Interestingly, they work even in people who are visually impaired. That's why many blind people are able to stick to a day-night rhythm even if they can't actually see light. By contrast, people who have lost their eyes entirely, to a tumor or accident, will find their sleep cycles hopelessly adrift.

When they sense light, these ganglion cells send a signal to a section of the brain that serves as the body's master clock, the suprachiasmatic nucleus. This nucleus is the conductor of the daily symphony that is our circadian rhythm. Although we associate this cycle with sleep (or, for some shift workers, the lack thereof), it plays a role in far more: in body temperature, blood pressure, hormone release, cognitive ability. Each fluctuation is carefully scheduled to happen when we need it. Even our cells are keeping time: Appropriately named CLOCK genes produce specific proteins in a 24-hour cycle.

It all comes to a climax around 11 p.m., when the sleep drive that has slowly been accumulating throughout the day reaches a sort of agreement with the various chemical signals coming from our circadian system: It's time to go to bed.

"The circadian rhythm is about every aspect of our physiology and behavior," says Russell Foster, the chair of circadian neuroscience at the University of Oxford. "And light is critically important in locking that internal rhythm to the external world."

If you start messing around with light, though, the entire symphony is thrown wildly off tempo. A shift worker who steps out of work at 6:30 a.m. to see the sun rising overhead will start to feel her blood pressure rise and focus sharpen, even as her sleep drive is saying to wind down. Torn between the two impulses, sleep will become infuriatingly elusive.

That's how a person winds up lying in bed at 10 a.m., cursing the sunlight. And 14 hours later, when it's dark and her circadian rhythm has finally caught up with the sleep drive, it's how the same person winds up snoring at her desk.

Of course, it's possible to override the body's natural rhythms. And if we want to have on-call doctors, 3 a.m. Slurpees and 24-hour news, it's necessary.

But we do so at great cost to public health, says epidemiologist Eva Schernhammer. For more than a decade, she has been working with the Harvard's Nurses' Health Study - a longitudinal study of one of the most well-known groups of shift workers - to understand how staying up all night can lead to chronic disease. To a recently recovered night worker, her findings sound bleak.

"The effects of shift work are so many-fold that it's really challenging to come up with a recommendation to overnight workers in terms of what they have to worry about," she said.

But here are a few: "Shift workers face a higher risk of diabetes, cancer" - Schernhammer's work helped prompt the World Health Organization to classify shift work as a probable carcinogen in 2007 - "hypertension, weight gain, mental health problems, heart disease."

Luckily for me, the increased risk to any individual is small, especially if a person's stint on the night shift is relatively brief. It's when you look at populations that have been on the night shift for decades or when you calculate the cost of shift work to public health on the whole that the hazards start to add up.

Scientists don't have a clear solution to the problems posed by working overnights. Schernhammer advises her patients to do their best to eliminate other risk factors from their lifestyles - things such as smoking, lack of exercise and poor diet. (So all those vending-machine meals consumed on nights when I forgot to bring my lunch to work were probably a bad idea.) Studies have shown that keeping office lights very bright at night and reducing exposure to natural light in the morning can help the circadian rhythm adjust, though that's easier said than done unless you want to drive home blindfolded. Night workers are also advised not to attempt to switch to staying up during the day on weekends and holidays, but that, too, is difficult for anyone with a family or a social life.

Then there's melatonin, a hormone normally released by the pineal gland after sunset and throughout the night; it can be taken as a supplement to help people fall asleep. I took melatonin throughout my time on Morning Mix at the recommendation of a doctor, but Schernhammer and Foster both warned that it's a temporary fix at best. Melatonin is more of a signal to the body that it's dark outside than a direct sleep inducer, Foster said, and the long-term health effects of taking it as a supplement aren't clear.

Instead, Foster believes that the future of sleep therapy will focus on a protein called SIK1. In an ordinary person, the protein works as a circadian rhythm stabilizer, preventing the body from adjusting too quickly to changes in the environment. But Foster and his colleagues have found that it can be blocked in mice to speed up the process of overcoming jet lag (simulated jet lag, that is - the mice weren't treated to a nice vacation in Hawaii). In shift workers, it might be manipulated to have the opposite effect, keeping the circadian rhythm constant despite the mixed signals from the outside world.

This is also relevant to others. People with mental illnesses and degenerative brain diseases are more likely to have circadian rhythm problems that exacerbate their illnesses. Helping them back to sleep again could help alleviate an immense amount of suffering.

For their sake, I'll keep cheering for better sleep therapies. But I hope that I won't ever need those again. As of last week, I am now a reporter for The Post's Speaking of Science blog, which operates during glorious daylight hours. I'm looking forward to getting some good stories, a good tan and, finally, a very good night's rest.