I've never stayed overnight at Wal-Mart, but the company does say that they do not officially prohibit it at the corporate level:
http://walmartstores.com/7657.aspx
There is a Yahoo group named walmartrving that maintains a database of stores where overnight parking is permitted, as well as where local ordinances prohibit it:
http://autos.groups.yahoo.com/group/walmartrving/
If you don't want to join the Yahoo group to read their etiquette suggestions and grab their latest store guide, this list seems to be pretty good a least with the stores in my local area:
http://www.walmartatlas.com/no-park-walmarts
More or less, the accepted protocol is to ask permission at the courtesy desk if the store is open, and park wherever they tell you. If the store is closed, park as far away from the store as possible. Obviously, setting up a canopy, taking out the grill and generator, or any other activity that makes it look like you're at a campground and not just parking overnight is frowned on.....