When Kelsah Borstein’s son Calder was two, he had a non-stop motor that kept him running throughout the day. “He vroomed his trucks up and down the couch, then threw them across the room and chased after them,” she says. “He’d be playing with a toy ambulance on a table and jumping and hopping the whole time.”

With that enormous expenditure of energy, you’d think getting him down to sleep would have been a breeze. But then, toddlers don’t always follow the rules of logic.

“He’s fought sleeping all his life,” says Borstein, a stay-at-home mom in Philadelphia. Her son discovered early the fine art of stalling at bedtime, she says. When Calder finally does doze off, though, he sleeps through the night. “We live a block from a fire station with a real old-fashioned bell,” Borstein says. “It wakes us up, but Calder is unfazed.”

Related: Baby on Board: The Best Way to Fly With An Infant or Toddler

Sleep is important at any age. But busy, urgent little people in their toddler years really need their rest, for their sake and for the sake of everyone else in the house, says Harvey Karp, MD, a pediatrician and assistant professor of pediatrics at the University of Southern California School of Medicine and author of the book “The Happiest Baby Guide to Great Sleep: Simple Solutions for Kids from Birth to 5 Years.”

Toddlers require 12 to 14 hours of sleep in every 24-hour period, including at least one good nap during the day. And if they don’t get their needed rest, Karp says, the whole family can pay the price.

Unfortunately, convincing youngsters to close their eyes and let go of the day isn’t always easy.

Many toddlers resist the urge to fall asleep, says Karp. “They’re starting to become more social, and they don’t want to miss anything,” he says. “They’re also becoming more stubborn and independent, and they don’t want to be told what to do.”

Related: 8 Smart Ways to Toddler-Proof Your Kitchen

Falling asleep is a skill that every child has to learn for himself, says Jodi Mindell, PhD, professor of psychology at St. John’s University in New York.

The secret formula for success

So how to make bedtime work for everyone? According to Karp, the job should start long before the sun goes down. Here is Karp’s and Mindell’s recipe for toddler sleep:

Lots of outdoor play. “You’re missing the boat if you don’t start the bedtime routine before bedtime,” Karp says. Kids should be encouraged to run and play outside —sunshine, fresh, air and exercise are a classic recipe for a sound sleep, he says.

Whole foods. Kids who eat their fruits, veggies and whole grains are less likely to suffer from constipation and other discomforts that can keep a little person awake, says Karp.

R-E-S-P-E-C-T. Karp also believes that a healthy parent/child bond comes in handy at bedtime. “You need to develop your relationship throughout the day,” he says. “Make them feel respected and understood.”

No bedtime bargaining. As frustrating as a sleepless, restless toddler can be, Karp says that bedtime is not a place for arguments or bargaining. “Toddlers don’t respond to reasoning,” he says. “I tell parents that you don’t want to go head to head with a caveman.”

Winding down (without the TV and computer). Mindell recommends starting to wind down an hour or so before bedtime. No more roughhousing, and no screen time, either. As Mindell explains, just the lights from a computer or TV can make it hard for a little person to feel like it’s time to sleep.

A 2011 study published in the journal Pediatrics found that kids ages three to five who watched the most TV at night were especially likely to have sleep problems. It also found that children who watched violent TV at any time during the day were more likely to have sleep problems at night. And in this study, “violent” included mild, slapstick or “fantasy violence,” which includes the cartoonish mayhem seen on shows such as SpongeBob Squarepants.

A follow-up study that encouraged parents to replace cartoon violence with shows like Curious George, Sesame Street and Dora the Explorer found that the substitution led to improved sleep for preschoolers.

Related: Block Blue Light and Sleep Better Tonight

A calm bedtime routine. When it comes to bedtime, predictability rules. “It’s important to have a routine,” Mindell says. “Kids want to know what’s going to happen next.”

The time-honored bedtime story. After the TV is off, the pajamas are on and the teeth are brushed, toddlers should be able to look forward to a good story. Mindell says it’s a good idea to always end with the same book. It’s a strong sign to your little one that story time is over, and it’s time to sleep.

Some white noise with that stuffie? Children who have trouble falling asleep by themselves may need a few comfort items, perhaps a stuffed animal or a special blanket, Karp says. “Those can be sort of a stand-in for mom or dad,” he says. Kids who are a little anxious at bedtime may need extra help, perhaps a nightlight or a white noise CD, one of Karp’s favorite sleep aids for babies and young children.

Discussing fears and monster magic. Older toddlers sometimes have fears about monsters under the bed or other imagined unpleasantness. This is a good time for parents to be comforting and reassuring. Parents are mistaken if they think by acknowledging their toddler’s fear, they’re encouraging it, Karp says: “It’s important to understand that emotions don’t go away unless they’re aired and respectfully heard.”

He adds that discussing fears is also a chance to be creative. “You can put up a dreamcatcher or spray a bottle of ‘magic water’ to spray around the room” to dispel monsters, he says.

The “I’ll be right back” routine. Even with these extra comforts, many toddlers will want mom or dad to stay with them until the very last waking moment. In such cases, Karp recommends a simple trick: the classic, time-tested “mommy (or daddy) will be right back” ruse. After he’s tucked in, give him some cuddles. Then come up with an imaginary errand and tell him you’ll be right back. Stay away for 5 seconds or so the first time, and build up to a couple of minutes; repeat as necessary. “He’ll probably be out quickly,” says Karp, who calls this technique teaching “patience stretching.”

Avoiding power struggles. The same technique can be applied to repeated requests for water. Rather than getting in a power struggle, Karp suggests telling children that you just remembered something very important — such as, “Wait! I forgot to kiss mommy — I’ll be right back!” Upon your return, ask your child what she wanted again, and this time, bring her the water. Gradually, lengthen the time between “errands,” so asking for more favors isn’t as inviting.

It’s probably best not to cuddle your kids to sleep every night. Toddlers are old enough to snap on their own clothes, operate remote controls and make an infernal noise with pots and pans: They are also, Karp assures us, old enough to fall asleep without a team effort.

Mindell adds that it's fine to leave toddlers in a crib until they are able to handle sleeping in a bed without popping up and down all night. After bedtime starts going more smoothly, says Mindell, parents can start trying to get a handle on naps.

Related: Is Co-Sleeping With Your Baby Safe?

Chris Woolston, M.S. is a freelance writer and editor who specializes in science, health and travel. A reformed biologist, Woolston says, he studied algae and nitrogen dynamics in Antarctic lakes before the Science Writing Program propelled him out of the lab. He is a contributing editor at Nature.com, a former staff writer for Time Inc.’s Hippocrates magazine, and co-author of Generation Extra Large (Perseus). He lives in Billings, Mt., with his wife – novelist Blythe Woolston – and their two children.