Chloeandj is correct, this is a maternal behavior and not as strange as we think. For more information, check out this site.
http://www.petstyle.com/dog/health_w...ection=feeding
It does concern me when you say that there was poop everywhere. That's a lot of poop. I know a lot of people use Royal Canine and love it; you are using puppy formula right? His poop should have the consistency of a tootsie roll. Some say that they eat their poop because there is still nutrition left in it and the puppy realizes that. Do you keep food and water in the bathroom at night?
Nancy