In deciding who should have the right to stay in the home, the court considers the needs of both people, including who is caring for the children. The court will be reluctant to order a person to leave the home unless the needs of the other person clearly outweigh his or her right to occupy.
If the situation is unpleasant you may prefer to leave the home rather than wait for a court order. However, you should keep in mind that the court is reluctant to interrupt children’s living arrangements and if a long time passes without you seeing the children (a couple of weeks could be enough) it may be difficult to get court orders for residence or contact.