Going to court to have a judge determine with whom the children will live can be an anxiety-producing experience. There are many factors that judges consider in custody matters. One is the living arrangements the children will have with each parent, but this doesn't mean that the court will automatically side with the parent who has the bigger house.
It is imperative that you can show the court that your children can have a good life and remain safe in your home. These are the two primary factors that they will look at when trying to determine who will have physical custody of the kids.
Judges are usually flexible when it comes to how parents configure their living arrangements. Typically, they want siblings of different genders to have separate rooms unless they are very young. They also might object to a young child having to share in a room with their teenage sibling. If your kids do have to share rooms at your house, make sure that they have private spaces where they can change clothes as well as a dedicated sleeping area in the home.
The court will usually consider your age and financial situation when deciding whether the children will fare better with you or their other parent. To be clear, your age likely won't matter if you are pursuing custody against your ex, but it might factor into cases of grandparents seeking custody of grandchildren.
Finally, the judge will look at how likely your children will adjust to life at your house. This might depend on the child's age and other factors over which you have no control. With this in mind, you should do your best to show why you feel your children will thrive best in your home.