Trains to Udon Thani stops at Dong Muang station just in front of airport (use bridge to Asia Airport express). It would be not advisable to board the train at Hua Lamphong. Due to the rush hours and weather conditions travelling time to anywhere central is unpredictable.
Do not trust the time table. Due to maintenance work and others the time table might change.
From Hua Lamphong main station to Dong Muang station the train takes around 35 to 40 min as you might notice from official timetables:
www.railway.co.th/English/Time_HTML.asp
Forget the idea of buying a train ticket and jump on a train. Especially on night trains usually even the first class is often sold out. You might need to book in advance, maybe at Udon Thani station too.
You can also book any ticket at Dong Muang station if you like. If there is no ticket (seat) available, take a taxi to close by Mor Chit 2 bus terminal. Busses to Udon Thani are running around the clock.
From Suvarnabhumi to Dong Muang takes about 25 t 30 min. Busses are using the express way. There are constantly busses running. It takes sometimes a lot longer from Suvarnabhumi to downtown Bangkok.
Be aware that most but not all (international) flights are ending at Suvarnabhumi.
www.bangkokairportonline.com/node/55
I prefer to travel on trains.