K.L.
At 39 weeks pregnant, very few of us are able to sleep - your situation is not unique or unusual. When you are that big, even if you haven't gained anything but baby weight, your body is at its breaking point as far as workload and it can be nearly impossible to sleep. I didn't even make it to 39 weeks - at 35 weeks, I already couldnt sleep because of the back discomfort - NO position is comfortable to sleep in when the baby is displacing all of your organs, sitting on your bladder, compressing the capacity of your stomach and lungs - your whole BODY is compromised!
You also have a toddler, which will make rest even more fitful and/or difficult. Just try to rest as much as possible - you don't have to sleep, just take lots of breaks throughout the day, have a cup of tea, and try to relax. After that baby is born, you wont be able to help sleeping every time you get the chance! You'll be exhausted, and when you get the chance to sleep when your new baby is sleeping, you WILL rest. Your body will force you to sleep. So, don't stress - we all go through this. Your body is probably very ready to go as far as labor is concerned, so just take it easy and wait for nature to take it course (if you chose to have an epidural in the hospital, look forward to some good discomfort free rest. I think the only GOOD sleep time I had before my daughter was born in the last three weeks of pregnancy was when I was in the hospital with the epidural. I was suddenly in NO discomfort at all, and got a good 6 hours of sleep before I delivered - it was GREAT!).