Pooping in middle of night

Grace • Girl mom♡ 5/2014 & 4/2020

My 9 month old has never pooped in the middle of the night until the last week. Every night waking up screaming and a poopy diaper! How do I get this to stop? She already struggles enough with sleep this is killing me!