I think you've gotten a lot of good advise from the other posters. I use to have a similar problems with Meka. To the point we had to crate train her at night, because she just kept using the bathroom in the middle of the night in random places. We didnt start crate training her until she was 8 or 9 mo's. There were a few times that she soiled her crate and I found that it was mainly 1.) because I threw off her feeding by feeding her later than normal 2.) Feeding her too much.
Eventually, we were told to feed her once a day (by our vet). Which helped and also I began to put her crate near our bedroom. That way she felt close to us. I also, began to associate the word "night night" with going in the crate at night. So that she knew it was bedtime and when she went in, we gave her a treat... which helped her know it was a good thing. Just remember, be consistant..and if there's any whining or barking, its okay to tell him "no". I think he'll get it eventually. Though I know its hard at first... good luck