Rare is the child who wants to give up and go to sleep — at either naptime or nighttime.

The more tired he is, the harder he will fight to stay awake. Hence it is up to his parents to establish a soothing bedtime ritual to help soften the blow.

Parents can choose rituals that help their child make the difficult transition from activity and excitement to a quiet, restful state in which he can develop his own pattern for going to sleep.

As early as 4 months of age, begin a routine of calming your baby and putting him down while he’s still awake. Thus he can learn to put himself to sleep. He will then be prepared, when he briefly wakens, to get himself back to sleep. Otherwise, he will continue to need your help when he wakes up — at least two times in an eight-hour sleep, and three times in a 12-hour sleep.

The bedtime ritual is necessary for his sleep and for his parents’ sleep. By 4 months, he is physically ready to go without a feeding for six to eight hours. And his brain has matured enough to be ready for his own role in learning to sleep.

Helping a child learn to put himself to sleep doesn’t mean that parents should allow the infant to “cry it out.” But if he is dry and physically well, you needn’t take him out of the crib. Instead, sit beside him, pat him soothingly, and croon softly, “You can go to sleep! You can do it! You can do it yourself!” Watch for his body and his breathing to begin to relax. Then croon and pat less so he can learn to settle himself.

From about 9 months, children are old enough to remember that you’d been there and to notice that now you’re gone, so they may need a parent to stay in the room. Get yourself a comfortable chair — you may be there for a while.

Over time, however, as you pat and croon less, you can move your chair farther and farther from the crib. As you gradually decrease your role in your child’s sleep, he will learn to put himself to sleep.

A routine for each sleep transition can be a wonderful time for communication with your baby. Gather him up to nurse him or to give him a bottle — to be finished before you put him down.

Look out the window together and say good night to the darkening sky. Or carry him to his bedroom, quietly saying good night with him to the pictures on the wall. In the chair by the bed (a rocking chair if you’re lucky), rock and sing softly. Read him a beloved book. (I have read “Goodnight Moon” and “The Cat in the Hat” several thousand times.)

Give your child a lovey — a thumb or his fingers, a soft bit of a blanket, a doll or stuffed animal, even a small part of a shirt or blouse you’re ready to part with. (Any object in the crib must be too large to swallow but too small to cause strangulation or suffocation.)

Infants under 6 months of age are more likely to use their fingers, thumbs and hands to comfort themselves, so you may have to wait until your child is older before he takes interest in a lovey.

Teach him how to cuddle his favorite blanket or stuffed animal as a substitute for you in this transition. At the point when he is quiet and drowsy, transfer him gently to his own sleeping spot. Pat him rhythmically and gently until he subsides with his lovey. Let him learn his own pattern for getting into deep sleep.

IN THE YEARS AHEAD

As a child gets older, preparing for the transition to sleep begins in the early evening, after supper. No more roughhousing or wild play. (This can be hard for working parents who want their chance to play!) No TV or DVDs before bedtime. The home is quiet now. Your child will know that bedtime is coming.

• Watch for signs that he is beginning to tire. Start your bedtime routines before he is too worn out.

• Be prepared for him to test the ritual. “I need to go to the toilet again! Just one more book! I’m scared — don’t leave me!” He’ll try every possible test.

• Set limits on these demands. Limits are comforting, not hurtful. Warn him, “Two more stories and then we’re through.” Or, “One trip to the potty and that’s it.”

• Stick to the new ritual, though it may be hard for you — especially if you’ve been away all day at work, or if you feel lonely yourself. Cuddling with him has been so delicious!

Questions or comments should be addressed to Dr. T. Berry Brazelton and Dr. Joshua Sparrow, care of The New York Times Syndicate, 620 Eighth Ave., 5th Floor, New York, N.Y. 10018. Questions may also be sent by email to: nytsyn-families@nytimes.com