Is it appropriate to ask for letters of recommendation from professor on maternity leave?

Yes

I think It would be different if say, you took one or two of her classes. But it sounds like she advised you a great deal, and thus she should have some investment in your educational success. Especially if you have talked about graduate school before. What is important is you give her notice as soon as possible so she can find some time to do it: Having a newborn is no easy job.

I would phrase it as follows:

Dear X (unless you call her professor, then Professor X, but my advisors I call by their first name)

How is your newborn?

I realize you are very busy with your maternity leave, but I was hoping you might have some time to write me a strong letter of recommendation for graduate school. As you might know I am interested in ZQR, and your mentorship over my senior thesis has been essential to my education.

Thank you for your time,

user

I'd also like to add that while I was applying to PhD programs, the professor who eventually became my advisor was on maternity leave while I was asking her questions about the lab. In confidence, she enjoyed my emails because having newborns, while a joy most of the time, often lacks the intellectual rigor that most people are accustomed to in their day to day conversations.

My guess is she will be very happy to do this, and somewhat expects you to ask.