Q. Our 27-month-old son is driving us crazy.

He had been sleeping through the night, in his own bed, until about eight months ago when he started to wake up crying -- sometimes more than once -- and wouldn't go back to sleep unless my husband or I lay there with him.

By the third night I was so tired I took him to our bed and since then he has awakened every night and gotten in with us. We just can't handle the stress of him crying (and he can keep it up for a couple of hours).

He usually goes to bed around 9:30 p.m., wakes around 7 a.m. and takes a two- to three-hour nap, but he only naps if I lie down with him and now he only wants me to lie down with him at night. And worst of all, he has to play with my hair, as if it were a security blanket, until he falls asleep.

I guess this is our fault for letting him in our bed in the first place, but is there any hope for us? Will this stop when he gets older? He has two teenage brothers and we didn't have the problem with them.

A. This is one of those tough, tough questions, not because the solution is hard to find, but because it's hard to execute.

It's so difficult to deny a child something that seems simple and easy in other cultures, and one that's often chosen in our own.

Many parents take a sick child to bed with them, so they can reach out to track the rise and fall of the fever, and some parents automatically keep their children with them every night for the first few years -- a custom most children like too.

Either solution is fine, for a child should be reared to suit the family, not the fashion, and nobody should feel guilty about it. The family bed isn't a popular choice, however.

Most parents find that a leaky, squeaky visitor makes a poor bedfellow, and they feel anxious or angry about giving in to the child, which only unsettles him more. Parents who give a child time or affection -- and then resent the giving -- make him need still more reassurance. This doesn't mean that he should be left to cry for two hours, of course.

There is a middling way to resolve your dilemma, but it may take as long as a week to work and it won't be any fun at all. Nevertheless, it's better for everyone to have a few quite miserable nights than to have rather miserable nights for quite a few years.

Your little boy needs imagination, consistency, patience, stamina and understanding, in about equal doses, but start with understanding first.

Remember: Your son isn't trying to drive you crazy. He just has a very small frame of reference, and a bad dream, or a scare you never knew he had, may have made him forget how to put himself to sleep. Now you have to let him learn this trick again.

Tell your son that he can sleep in his own bed from now on because you've gone to the Sleep-tight Store, and bought -- you'll say with great seriousness -- a stuffed bunny that plays a lullaby; some dream spray to ensure good dreams (which you make by filling a clean spray bottle with water); special talcum powder to shake on his tummy and keep him super-safe; and a magic blanket with a luscious fringe, which he can use instead of your hair.

Give him these charms and a kiss, tuck him in his bed, sprinkle him with invisible stardust, turn on the night light and tell him you'll sit in a chair, right outside his door.

And after all this, he'll cry anyway, but his pattern will change because you're changing your pattern too.

Since you're the one who's been going to him at night, your husband should take over the evening shift, answering to his son within 10 minutes after he's started to cry. He'll give the boy another kiss and some hugs, lay him down, mist him with another shot of dream spray -- and leave the room.

And he does this again and again and again, always returning in about 10 minutes, and a little more businesslike each time -- the same routine you'll follow at nap time, even if it makes him skip his nap for a while.

Repeat this same routine night after night, nap after nap, without variation, and in a few days, he'll cry less and call less, and then not at all, not because he is in despair, but because he knows that one of you is nearby.

This may seem heartless, but your little boy needs to learn one of life's most basic skills: to put himself to sleep. If you respect him enough to let him learn it, he won't be afraid when you go out at night or when he visits Grandma or when the thunder wakes him up. You've taught him to depend on himself.

Questions may be sent to P.O. Box 15310, Washington, D.C. 20003.