I've personally found what works for me is to get up. My mind is racing. Sometimes a warm bath and book can get me back to sleep within thirty minutes, or sometimes, like this morning, I'll just do a bit of work, like writing an article on insomnia tips in pregnancy.
There are plenty of things that can prevent you from sleeping well in pregnancy (the baby moving, needing to go to the bathroom all night, physical aches, etc.). The key is going to be how you choose to deal with the sleeplessness. I've found it nearly worthless to get upset or angry about it. So enjoy a few tips on what has worked for myself and other pregnant women. Do you have an insomnia tip? Feel free to add it to the collection.