There really are no rules regarding sleeping together during a divorce. Other than the obvious emotional harm or trauma that could result, there is nothing legally preventing two people who are sleeping together from obtaining a divorce if they want it. I'm sorry to hear that you are struggling.
There are no court rules or statutes that prevent a husband and wife from sleeping together before, during or after a divorce. In fact, the only law in Massachusetts preventing people from sleeping together is a prohibition on adultery which is not enforced anyway.
However, it could be extremely unhealthy for you to continue to sleep with your spouse if you are hopeful that it will result in a reconciliation but your spouse is adamant that it will not.
In Massachusetts, if only one person in the marriage believes that the marriage is over, then they may file a Complaint for Divorce under Section 1B. Under this no-fault statute if that person is willing to state under oath that they believe the marriage is irretrievably broken down with no chance of reconciliation, then the Judge will grant the divorce and the other party is helpless to stop it once the person's mind is made up.
If there is any chance of saving your marriage, it is most likely to come from marriage counseling and not from "sleeping together". You may also want to consider marital mediation (for which I've provided a link below).
Sign up to receive a 10-part series of useful information and legal advice about the divorce process.