At the risk of sounding dramatic, bedtime has always been the bane of my existence.

As a child, it brought on anxiety, and fears of intruders and house fires abounded. As a teen, bedtime meant I had to close my computer and end phone calls with friends, and what a terrible thing to have to do. As an adult, bedtime often felt lonely and stressful, with endless to-do lists and existential thoughts suddenly overcrowding my mind. Now, as a parent, bedtime entails being utterly exhausted – bone-tired, brain-fried – but unable to rest until I wrangle my two energetic children into bed and somehow convince them to stay there.

It’s easier with my infant – just knock him out with some of Mama’s milk and he’s not going anywhere, but with my preschooler, it’s a different story. For the first three years of his life, he co-slept with my husband and me. While our family fell into the habit out of sleep deprivation and desperation, I grew to completely love co-sleeping: the cuddles, the closeness, the ease of nursing, the reassurance of having my baby right beside me, and the reassurance it gave my baby.

Still, as the saying goes, all good things must come to an end, and I knew that end was near when I became pregnant with my second son when my first was two and a half. I could tell by then that my big boy was ready for his own bed and his own room (both of which he had – he just hadn’t slept in them yet), but I also knew that this was going to be a tough transition, for both of us if I’m being honest.

I looked to the Internet to help me figure out what to expect from this process, and I came across the term: “Jack-in-the-Box Syndrome,” defined as a common “affliction” causing children to constantly pop out of bed after their parents have put them to sleep due to a major case of FOMO (fear of missing out). The articles I read contained some tips for dealing with it, but I soon learned that I’d have to think outside the box, because my son’s “Jack-in-the-Box” game was on point and strong.

“Hey Mom. I’m hungry.”

“Dad! I’m thirsty.”

“There are shadows on my wall.”

“What’s inside the wall?”

“How many miles have I slept so far?”

“I mean minutes.”

“Is it morning?”

By the third or fourth night of this, I was losing steam. I couldn’t spend the whole night ushering him back to his bedroom, and he couldn’t be staying up so late. I started to waver in my decision to transition him. Should we build some kind of epic family bed instead that can fit our growing family? No, no, no, I thought, this will be so good for him. He’ll learn to love his big boy bed and be proud of his independence.

But how would we get there?

One night it dawned on me as I was using the talk button on the baby monitor to tell my son, “You better not open up that door!” that I could use this talk function for way more than issuing warnings. I could use it as a tool to make it appealing for my boy to remain in his bed by inviting him to engage in actual conversation with me over the monitor. This way, I could open up the lines of communication that he so misses when I shut his bedroom door, and I could also ensure that I don’t miss out on the meaningful talks we always had while co-sleeping when he was relaxed enough to really open up – talks that would be more difficult to have with a newborn in the mix. Plus, we could pretend like we’re using walkie-talkies, and how fun is that? This could be our new special thing.

And just like that (well maybe there were also some toy rewards involved) bedtime started to change for the better. Not only did this parenting hack help my son stay put in his room, it also helped keep our bedtime routine (relatively) short and sweet. Kids will do just about anything to prolong saying goodnight. Now when my little man gives me puppy eyes after we’ve already done bath and books and snuggles, and says, “But I just have to tell you one more thing!” I reply, “And I can’t wait to hear that one thing, over the MONITOR!” and I make it sound super exciting. It works.

Now, of course, this monitor chatting can get a bit out of control, and there’ve been plenty of shit-show moments where I’m trying to nurse the baby to sleep while also fielding questions from my preschooler about why he can’t marry his cousin and how many days are left until Christmas. When this happens, I remind him that he needs his sleep and kindly request that he slow his roll with the questions. For the most part, he does.

Other nights, he barely talks to me at all, but knowing that he can is comforting to him, and that’s what makes this system so great. He gets his own space and chance to self-soothe, which is healthy and important at his age, and I don’t have to spend hours in a dark room waiting for him to fall asleep. I can tend to his baby brother, do chores, or unwind while still helping my son feel secure and heard as he decompresses from the day.

“I love you to the moon and back,” he tells me over the monitor each night.

“I love you to infinity and beyond,” I respond.

I don’t know how long he’ll want to talk with me like this, but I’ll be ready and waiting, monitor in hand, for as long as he does. When my six-month-old gets older and moves out of my bed, I’ll try the same hack with him, although with his chatty and loving big brother around, I may not even need to.