When a court is asked to determine child custody, they will do so by looking at the best interests of the child. In order for them to change their original custody decision, there generally must be some material change in circumstances that affects the court's view of what is best for the child. If your ex is living with someone without being married to that person, then this may be viewed as a material change in circumstance and may be grounds for a change in the custody arrangement. This is true whether the person your ex is living with is a same-sex partner or not.
Cohabitation and the "Best Interests of the Child"
The laws vary by state. In Virginia for example, code § 18.2-345 states that those who are living together without marriage and "lewdly and lasciviously" associating with each other are actually guilty of a Class 3 misdemeanor. If they continue to repeat this offense, they may be guilty of a Class 1 misdemeanor. Thus, whether they are engaging in a homosexual relationship or not, if they are living together in a sexual relationship without being married, they can be seen as violating the law.
Since they are breaking the law, the court may view this as an environment that is not in the best interests of the child. If the cohabitation was not occurring at the time the original custody order was made, the fact that your ex is now in violation of the law can be seen as a material change in circumstances, allowing you to petition for a change to custody.
The court will consider the situation, as well as whether you can provide a more stable home that is a better environment for the child, and make a determination on what change may be appropriate, if any.
Getting Help - Child Custody and Cohabitation Changes
If you are involved in any custody dispute, having a lawyer on your side to protect your rights is essential. Your lawyer can help you take the proper steps to handle this situation and best protect your child.