Surgery can make anyone anxious, but it is especially hard for young children. Kids going into surgery may be separated from their parents for the first time in a frightening new environment, and they may not understand what's happening.

"For many families and kids, this is one of the most stressful events in their entire lives," says Dr. Samuel Rodriguez, an anesthesiologist at the Lucile Packard Children's Hospital at Stanford.

Panicking before surgery can cause both physical and emotional problems, research shows. If children are crying, for example, they're sucking air into their stomachs, which increases the risk that they'll aspirate saliva into their lungs. Anxiety before surgery can also cause long-term psychological distress and behavioral issues in kids, and it's been associated with a more painful recovery.

It is dangerous enough that many children are given an anti-anxiety medication before general anesthesia. But medications always carry risks.

"Anytime we can decrease exposure to a medication, especially in a young child who has a developing brain, it's preferential to use some of these non-medication techniques to get them off to sleep," says Rodriguez. He wanted to come up with a safer, cheaper and more entertaining alternative.

So Rodriguez and his coworker Dr. Thomas Caruso, also an anesthesiologist at Lucile Packard, began tinkering with various pieces of technology that they purchased online.

"My wife gets upset because I'm getting all these packages from camera and tech shops. For a while one of the rooms in our house and whole garage was filled with all these parts," Rodriguez laughs.

Eventually, they came up with final product: an easily disinfected video unit that they could mount on any hospital bed that projects an image onto a large screen hooked onto the bed right in front of the patient's eyes. The screen travels with the patient through pre-op, and feels more immersive to the child than a small, distant TV screen.

They called it BERT, short for Bedside Entertainment Theater. It looks high-tech, but the whole thing costs about $900 to build. Lucile Packard now has 10 BERT units across the hospital. They're using it before surgery, of course, but they're also using it to calm kids who are at the hospital to get radiation therapy or an MRI.

It is not the only technique Lucile Packard and other hospitals use to help kids relax without medicine. Some hospitals give kids iPads loaded with games. And there are low-tech approaches, like telling jokes, letting kids decorate their anesthesia masks with stickers, or playing doctor with their stuffed animals. The doctors and nurses and other specialists at Lucile Packard use all those techniques, depending on what the particular patient seems to like.

Ten-year-old Matthew Husby enjoys trying out a BERT unit. An articulate red head with a face full of freckles, Matthew has been sick from birth with a rare genetic disorder that affects his mitochondria. As part of his treatment, he's had to go under anesthesia dozens of times – five procedures in the past month alone.

This time, he's having a gastrostomy tube inserted into his stomach, to help relieve the gas in his struggling digestive tract.

Matthew explains his condition: "My colon doesn't work. And it has a lot of gas in there that can't get out, so it starts hurting. The G-tube is to let the gas out."

He's used to the surgical process, and says he feels calm and prepared. But even this pro still gets some butterflies right before surgery.

When he was younger, the experience was terrifying. "I think it feels really closed in when you have a mask put on you and there are people all around you," says his mother, Cullen Husby. "And he would shake and cry and scream.

Rodriguez visits Matthew in his pre-op room, wearing a Spiderman surgical cap, and begins explaining exactly how BERT will work. Matthew is excited to pick his own video out of the many options already programmed into the projector unit, including action, sports, cartoons and music videos.

He picks out an episode of the cartoon show Ninjago. Rodriguez says they had to stop letting kids pick videos off YouTube, because too many choices were questionable.

"Believe it or not, all of the most recent Justin Bieber videos are inappropriate," says Rodriguez.

As soon as the video begins, Matthew is completely immersed as Rodriguez unlocks the bed to take him to the operating room. This is often the worst moment for kids — the moment of separation from their parents – but Matthew hardly seems to notice as his father kisses him goodbye. Rodriguez — also a Ninjago fan — peppers him with questions.

"Matthew, do you have any of the Ninjago characters, toys anything like that?" he asks, and Matthew answers everything enthusiastically.

In the operating room, Rodriguez and the nurses move Matthew over to the operating bed, and quickly move the projector unit as well. The movie is now projected onto the back of a surgical light above Matthew.

Rodriguez switches the movie from Ninjago over to one he's designed and edited himself. It's a compilation of clips from NASA, Toy Story's Buzz Lightyear and Minions, which together create a full blastoff experience. The idea is for the child to feel like they're taking a trip to the moon instead of going under for surgery.

"Let's get our space monitors! We've got our space masks right now," says Rodriguez excitedly as he places the anesthesia mask over Matthew's face. "All right let's get ready for our countdown!"

Rodriguez counts down from 19, along with the NASA clip still playing above. "All right let's get ready for our blast off! You're gonna start feeling the rocket begin to move!"

The nurses gather round the bed, shaking it.

"You feel it? Can you smell the rocket fuel? Take a deep breath man." Matthew's eyes begin to flutter as he drifts off to sleep. "Good job, buddy. Matthew are you still with us?"

No answer. Matthew is asleep and ready for surgery.

Afterwards, his mom looks relieved.

"I don't think he even saw all the machines and everything around him," she says.

A few hours later, Matthew woke up. He didn't feel great, but he was still in good spirits. He wanted to make clear that he did not actually believe he was going to the moon.

Copyright 2016 Kaiser Health News. To see more, visit Kaiser Health News.