Anyway, let's clear up two things: First, Mormons do not believe their underwear is "magic". However, they do believe their under garments serve as a reminder of their personal commitment to God, and it should be noted that remembering the love of God has saved many a person from harm, danger, or error. Second, Mormons do not call them "underwear" but they call them "garments".
Is there any indication that clothing serves as a reminder of God?
Numbers 15: 37 - 41 gives an indication as to why the children of Israel wore some types of clothing.
And the Lord spake unto Moses, saying, Speak unto the children of Israel,
and bid them that they make them fringes in the borders of their garments
throughout their generations, and that they put upon the fringe of the borders a ribband of blue: And it shall be unto you for a fringe, that ye may look upon it, and remember all the commandments of the Lord, and do them; and that ye seek not after your own heart and your own eyes, after which ye use to go a whoring: That ye may remember, and do all my commandments, and be holy unto your God. I am the Lord your God, which brought you out of the land of Egypt, to be your God: I am the Lord your God.
The analogy I like to use is a watch. Every morning thousands of people awake in the morning and in their routine put on a wrist watch. For me, my watch provides me with a reminder of the time, although I admit I did have one of those cool calculator watches back in the day. With a simple glance at my watch I can tell whether I am late, early or on time for a meeting. I can see how much time I have before lunch or how many hours to go before I head home. The watch serves as a reminder of the movement of the sun, which we recognize as the time of day or night. The wrist watch is a useful part of my wardrobe.
Following this line of thought, the Mormon garment becomes a daily reminder of the promises a Mormon has made to follow Gods commandments. Both Mormon men and women wear the garment "that [they] remember, and do all [God's] commandments, and be holy unto your God" (Numbers 15:40). For a practicing Mormon, the garment serves as a useful part of their wardrobe.
Read another great explanation at The Beehive.