Whereas there are many instances in which subletting takes place in Massachusetts, I believe that there are aspects of the process that may actually be considered illegal.
When the initial renter is signing the lease, it makes them responsible for any damages that may occur. This will most likely be the outcome, regardless of any secondary contracts between the original renter and the sub-letter. At best, there would have to be two separate processes to correct the situation.
For this reason, it would be a better solution to create a new lease between the landlord and the new renter, with a possible contract limiting the length of the stay.