Answer: The scripture you are referring to in regard to what it means to possess an undefiled marriage bed (assuming, of course, that the couple is a man and a woman, and not the unbiblical coupling of two men or two women) between a couple is found in Hebrews 13.
The chapter begins with a variety of admonitions by the apostle Paul, such loving each other, showing hospitality to guests, and taking care of those people who are prisoners for the sake of the gospel (Hebrews 13:1 - 3). In verse 4 he admonishes all his readers to remember that marriage is an honorable institution, ordained by God, and that the union he sanctioned be kept sexually undefiled.
Let marriage be held honorable by all, and the marital union be undefiled; for God will judge fornicators and adulterers (Hebrews 13:4, HBFV).
The Greek word translated "undefiled" is amiantos, Strong's #G283, which means unsoiled or pure. Thayer's Greek Definitions further expands the definition by stating it is "free from that by which the nature of a thing is deformed and debased, or its force and vigor impaired." This verse is clearly discussing the sexual aspect of a husband and wife's relationship as Paul also mentions the Eternal's judgment upon those indulging in sinful sex-based behavior such as adultery.
To understand what it means to have a Godly and undefiled martial relationship we need to know what can ruin it. The Old Testament has plenty to say regarding how someone can pollute himself or herself through sex. As was stated previously, adultery is clearly unacceptable behavior (Exodus 20:14, Leviticus 18:20). We are also commanded not to have intercourse with animals (Leviticus 18:23) or with a person with which we are closely related.
Any sex between those of the same gender (even if the governing authorities allow same-sex marriage), known as homosexuality and lesbianism, is also expressly forbidden (Leviticus 18:22 - 24). Avoiding these and other illicit practices will help to keep the sexual relationship with one's partner pure.
It should also be stated that although the Bible does not forbid anal sex between a husband and wife, it might not be wise to indulge in it for health reasons. It would also not be the better part of wisdom for a couple to engage in intercourse during a woman's period.
The book of 1Corinthians offers us a few principles regarding the proper sexual behavior within matrimony that leads to one that is pure and undefiled. Both the husband and the wife need to consider their mate's sexual needs and their capabilities. Each person should regard their bodies as belonging to their mate and not under their own total control to do with it whatever they please.
Lastly, to maintain an undefiled marriage bed, intercourse should be refrained from only by mutual agreement for the purpose of fasting and prayer. After these acts of drawing close to God are completed, a couple should come together so that they are not tempted to fulfill their needs elsewhere (1Corinthians 7:1 - 5).