My job was ending. My marriage was over. My life plan was in ruins. But I had two beautiful, perfect children. Or at least they seemed that way when they were asleep. Being their mother meant shouldering a profound responsibility and experiencing a heart-smashing love. It gave me a reason to keep going.

Four months later, I got better. In the fifth month, I got well. But at that point, we had our routine, and it was devilishly difficult to break. My children did not want to go back to their own beds. I didn’t want them to either.

It was not so much that I had grown used to them. It was that I needed them — the immediacy and sweetness of their presence on either side of my body — to fall asleep.

In 2015, I bought bunk beds as an incentive to break what I knew to be a bad habit. That got them back in their room. But the co-sleeping did not end; it just changed.

My son had difficulty falling asleep alone. I would lie next to him and wait, getting up when I was sure he was asleep, only to have him call me back again. A friend recommended mindfulness meditations, so we started listening to them on my phone. The meditation guide’s soothing voice told us that the mind is like the sky: “So when thoughts come, they’re just temporarily obscuring the vast, open nature of the sky. And they’ll pass.”

“That’s my favorite part,” my son whispered. “Me too,” I whispered back.

The meditations worked, maybe too well. Inevitably, we both fell asleep, me waking up several hours later, my nose inches from the ceiling, the meditation guide still talking about the sky. Groggy and confused, it took me a minute to remember that I was on the top bunk of my 6-year-old’s bed. I climbed down, walked unsteadily down the hallway and fell into my own bed, too tired even to read.