There are certain rules and conditions involved in marriage that are required to make that marriage righteous. That is, a marriage pleasing and acceptable before God. A righteous marriage is one that is sanctioned by Him, fulfilling His design and will for a man and a woman in His creation.
The first and most important condition required for a marriage to be righteous is understanding what really constitutes a legitimate marriage in the eyes of the Lord and whether you qualify to be married without actually making it unrighteous by it being deemed an act of fornication instead.
Once it is determined that you qualify and you make a marriage, there are three other important rules and conditions applicable to make the marriage functional and righteous:
DUE BENEVOLENCE: The Apostle Paul speaks concerning this important rule in 1Corinthians 7:1-5. This "due benevolence" deals with a husband and wife's understanding that marriage is designed by God to fit within the command to pro-create. Because of this sexual aspect involved and the importance of its natural need to be satisfied, Paul makes it very clear that this satisfaction must come from the spouse, to whom they are one with, and by no other. Therefore, to withhold one's self from the other, without consenting for a time to holy actions, will cause harm to the marriage and risk making it unrighteous. Your body is not yours, but your spouses. Exercise that good will and respect to the other.
ABIDING IN YOUR RIGHTFUL ROLE: The Scriptures give us insight as to the position and role between a husband and a wife. The Apostle Paul illustrates the correlation of the marriage union between a husband and a wife with the believer's marriage union with Jesus Christ. In Ephesians 5:22-33, he advocates particularly that the wife is to submit herself to her husband and the husband is to love (serve) his wife similar to their role as Christians being united to Christ. The wife typifies the body and the husband typifies the head.
For the man to step out of the husband's role as the head and the woman to leave her role, usurping her husband's, can and will make that marriage unrighteous. It would be the same as them stepping out of their roles and usurping the role of Christ as their spiritual head. How unrighteous that would be and is.
Think of it this way. When has your physical body ever decided to do its own thing in contradiction to your physical head? If it did, your body would not function properly and be retarded. Also, if the head demands the body to function out of its design, expecting it to do what the head is designed to do, once again, the body will be retarded and out of sorts. This causes incapacitation, frustration, anger, resentment, and confusion, which will undermine a righteous union of the two. This is not what God designed or approves.
CONDUCT TOWARD EACH OTHER: The Apostle Peter, in 1Peter 3:1-7, sets an order to the marriage regarding the conduct of the husband to the wife and the wife to the husband. Again, the wife is to be in subjection to her husband. Peter uses Sarah, Abraham's wife, as an example. He describes the righteous conduct of Sarah as not focusing upon her outward adorning of the body as much as the inward adorning of meekness, quietness, and trusting God, who made her husband her head, guiding him on her behalf. The husband is to deal with his wife "as the weaker vessel" (physical structure and make-up), as well as honor her as a member of the body of Christ. This righteous conduct of the husband is critical for his prayers to not be adversely affected.
These things make for a righteous marriage.