From my perspective as a landlord-tenant lawyer, I don’t see anything illegal here. (Assuming that the agreement is not to trade sex for a place to stay. Because that would be unethical and illegal).
That said, this could turn into a legal issue if the parties do not honor their lease obligations as a result of their sexual relationship, or try to impose additional duties on one another beyond the landlord-tenant relationship.
I have not encountered this issue in my practice yet, but I wouldn’t handle it much differently than I would a standard case. Tenant not paying? I’m filing for failure to pay rent. Landlord unreasonably decreasing the quality of services for the tenant? I’m filing for rent escrow. Landlord getting violent towards tenant or vice-versa? I’m filing for a peace or protective order.