What type of trust?
If it's a land trust, technically it's not a lease purchase. It works similarly, but you'd be a beneficiary (resident beneficiary) of the trust. After a period of time, the property would be brought out of the trust and you'd have the opportunity to purchase it.
A variation on this is that you could purchase the trust. A similar process is sometimes done with properties placed into LLCs. The buyer then purchases the LLC, which holds the trust.
I'm less familiar with other forms of trusts, but there, too, I believe that the property would be brought out of the trust, and you would purchase it.
So, to answer your specific question: Yes, the process--if properly done--is legal. It's also a good technique for asset protection.
However, you definitely need a lawyer familiar with trusts (and, specifically, the type of trust holding the house) to review the documentation. As an aside, most lawyers aren't familiar enough with trusts to provide the type of advice you're seeking, or the protection you need.
And a final comment: Whether using a lease-purchase or a land trust, even if you're fully protected, if you fail to purchase the property or default on the option (or purchase agreement), you will lose your option fee (in the case of a lease purchase) or your contribution (in the case of a land trust). Everything's negotiable, of course, but most lease purchases and land trusts (PACTrusts and NEHTrusts, for instance) are structured so that the upfront money is credited in some fashion if you buy, but is forfeited if you don't.
Hope that helps.