It's grammatically okay, but what does it mean? A persistent state of happiness doesn't exist for most people forever.
Perhaps something like this: I was afraid the baby would cry while we were visiting our friends, but fortunately, he stayed happy throughout the visit.
Would a translation using "stayed this happy" rather than "stayed so happy" work better for you, GG? Maybe something along the lines of: "I'm happy now, and since I intend to stay this happy, I am not going to be spending Christmas with my mother-in-law?"
For some reason "Stay happy!" jumped into my head as a cheesy parting line, along the same lines as "Be lucky!", "Mind how you go, now
I like my mother-in-law, but what you've written seems okay to my ears otherwise. "I stayed so happy the whole time" just doesn't ring natural. Don't worry -- stay happy!