If insomnia is derailing your sleep, a prescription sleeping pill may not be the best cure. Here are some options to explore:

Practice good "sleep hygiene." This does not mean making sure your bedding is clean! It means following good sleep habits, especially ensuring the bedroom environment is conducive to sleep. Among experts' recommendations: Use the bedroom only for sleep and sex; keep regular sleep and wake times; eliminate afternoon caffeine; banish pets (and snoring partners) from the bedroom; ensure the bedroom is a dark, cool, quiet place; and get computers and TVs out of the sleep environment, because they stimulate the brain and their light tells the body "it's daytime," disrupting the internal clock.

Break the rules when necessary. While experts' common-sense recommendations about sleep hygiene should be the first line of defense against insomnia, selectively breaking them can sometimes help, too. TV isn't recommended, for example, but a DVD or show (make it a boring one) may put some people to sleep. "Listen to experts' rules; don't throw them out," says Gayle Greene, 65, a lifelong insomniac who has learned to cope. But "bend them, make them work for you."

Develop a pre-bed relaxation ritual. "Adults need these rituals, too," says Meir Kryger, director of sleep research and education at Gaylord Hospital in Wallingford, Conn. "You'd be amazed at how helpful they can actually be." To develop a nonstimulating evening ritual, you might recall what your parents did when you were young to get you in sleep mode. Or try taking a hot bath or sipping a warm cup of chamomile tea; either will raise your core body temperature, which leads to a drowsy feeling as you cool down, says Lisa Shives, medical director of Northshore Sleep Medicine in Evanston, Ill.

Try not to self-medicate. "I personally don't recommend that people just go out and treat themselves with over-the-counter medications," says Kryger. "They never solve the problem; they'll just help you get through." Pharmacies certainly offer lots of sleep remedies. There are antihistamines, like Benadryl, which have a sedative side effect. (The ingredient that causes drowsiness is also found in products like Tylenol PM and Advil PM.) But those medications can induce next-day grogginess—what some patients call "sleep hangovers"—and they can actually have an alerting or a disorienting effect on the elderly, says Shives. Other OTC options include melatonin supplements and valerian extracts, although evidence of the effectiveness of either is slim, a National Institutes of Health insomnia consensus panel concluded in 2005. And, as Shives says of melatonin, valerian, and similar substances, "Nobody's regulating this stuff."

Don't drink to sleep. Sure, sloshing down a little Pinot Noir will put you to sleep, but as the alcohol is metabolized by the body, it fragments sleep, which tends to cause nighttime awakenings and next-day tiredness. "People have the misconception that alcohol helps," says Ralph Downey III, chief of sleep medicine at the Loma Linda University Medical Center in California. "It doesn't."

Create a barrier between work and sleep. You want to have some sort of break from the day's stress before sleep, advises Lawrence Epstein, medical director of Sleep HealthCenters in Boston and coauthor of The Harvard Medical School Guide to a Good Night's Sleep. If you know you're going to bed at 10:30, stop your day at 10:15, or sooner if you can. Shortchanging that break can be a recipe for insomnia. Write down all the things you need to worry about on a piece of paper, and do your best to leave them behind. Whether asleep or awake, there's likely nothing you can do about them until tomorrow, anyway.

Don't "catastrophize." People who can't sleep tend to compound the problem by fretting about the consequences of their sleeplessness, like the possibility that they'll do a bad job at work and get fired. Catastrophizing a sleep problem, however, tends to further engrain it, says Shives. "I try to get [people] to calm down," she says. "But that's kind of like telling a depressed person to perk up."

Retreat to a "safe room." Don't stew in bed. Create a "safe room" to retreat to when sleep escapes you, Downey advises. If awake for more than 20 minutes after your head hits the pillow, get out of bed and go to that room. Don't turn on a light, don't go on the Internet, don't read a book; just relax, he says, for 20 minutes, or until sleepy. Repeat as necessary, all night long. This process is called conditioning. You want to prevent your bedroom from becoming associated with frustration. If you live in a dorm or a studio apartment, Downey says, use a screen to carve out a sitting nook away from the bed.

Exercise. While experts advise against vigorous exercise too close to bedtime, a morning or evening workout can be beneficial. "We know that it promotes the slowest waves of sleep," says Mary Susan Esther, president of the American Academy of Sleep Medicine.