What time will you have the 12 hours free? You could check into a cheap hotel and take a shower and sleep. If it is during the day/evening hours you can use the cheap 45 baht City Line, Rail Link train to take you into the Pratunam area for shopping and lunch. The Rail Link also connects to the Skytrain.
http://www.urbanrail.net/as/bang/bangkok.htm
http://bangkok.sawadee.com/skytrain.htm
There are meter taxis at the airport that you can use to take you into the city and back to the airport in time for your flight. You can get a taxi in Bangkok for your return to the airport 24 hours a day. What you do depends on the time you have free. You can eat cheap at the airport on the first floor, near door 8, is the Magic Food Court.
http://www.bangkokairportonline.com/node/52
Just keep in mind that for an international flight you must be back at the airport 2 hours before your flight. If your flight is only to another city in Thailand you should have just planned on a night or two in Bangkok anyway.