My 3-year-old was awake for a chunk of the night again. We’re trying to break a bad habit of letting her climb into bed with us for part of the night or giving in to her insistent demands at other times that we sleep in her bed. You see, I am nine months pregnant, due in a few days, and I know that I am unable to let this go on.

So there we were, as she pitter-pattered her way back into our room after at least a dozen returns to her bed, and tuck-ins and hugs. I forced myself awake and felt progressively sick to my core, and increasingly angry—at her, at me, at my husband, at life, even at G‑d. Filled with a sense of frustration, I felt a wild desire to shout and scream and punch my pillows. Why would G‑d throw this my way now, when I feel unable to cope and am so tired? When I so long for the sense of renewal one feels after a night of uninterrupted sleep? I know how I am the day after these nights: short-tempered and fuzzy, and unable to think or feel clearly.

And then, for a split-second, I had this thought that it must be for my good. After all, it was my current reality, and not only was resisting it pointless, it was also entirely contrary to the highest potential reaction—namely, embracing and accepting what is. Of course, that’s not so easy. As the night wore on and my patience grew thinner, I couldn’t quite hold on to the truth of this revelation, yet on the other side of the long dark night, I know that it is truth. The secret to life is accepting what is.

This morning in my work space, I noticed a little card a friend gave out at a gathering on her birthday. She asked others to recall and write down the one lesson that stood out for them during the High Holidays—something we wanted to carry with us through the year, through the dark moments. And on this card I had scribbled: “Crowning Hashem (G‑d) as King,” and underneath it, “accepting His will.” This past Rosh Hashanah I began to internalize that part of crowning Hashem as King is being one with what comes our way, with what is.

And that means that everything is really for our highest good, even when we don’t see it. Right now, this small example of my lack of sleep (though a huge deal at the moment) is really allowing me to learn the vital lesson of acceptance, which is so important for all the greater tests in life.

Not only is the lack of sleep perfect (or it wouldn’t be happening), but so is the rain and the hay fever and the message from a friend letting me down . . . whether seemingly good or bad, amazing or devastating.

So it’s not to say that we won’t pour effort into resolving our current sleep crisis. And we won’t give up trying various methods in the attempt for some peace and real rest. But if I should be faced with another sleepless night, I pray that I will have the clarity in the moment to see any opposition to reality as the real challenge. My hope and intention is to try to open my eyes and hands and heart to the “gift” of what is.