It is okay for the 3 year old boy to sleep in a poopy diaper as long as it is not bothering them.
i have a 3 year old son myself who is not potty trained yet and he sometimes poops after he goes to sleep and I let him sleep in his poopy diaper as it's hard to get him to go to sleep.
He's been just fine sleeping in the poopy diaper and so i wait to change his diaper in the morning when he wakes up.