I have to disagree with both responses so far. Please don't get in the habit of rocking, singing, strolling, etc... The more you do the more she will rely on you to get her to sleep everytime, and it won't help in this situation anyway.
She is pooping at the same time because that's the way her internal clock is set right now. I know it's been that way for a while now, but that's not the way it will always be. Her body will change as you start to introduce more solid food, and as her naps change and as she grows. For now, you can try changing up her bedtime to she if she can sleep past that 4:00 mark. She can't get back to sleep at that hour because by that time she is already quite rested. The goal is to get her to not wake up. I don't know what time she is going to bed but I would first try putting her to bed earlier, instead of 7 maybe 6 for example. This will cause her to either wake earlier to poop, in which case it will be early enough for her to go back to sleep, or she will sleep deeper and hopefully past 4:00am.
If she does wake up to poop, keep the lights low, talk as little as possible, change her diaper, put her back in her bed and tell her it's still night time and she needs to go back to sleep. Then leave and do not go back in. It may take her a while to get sleepy again, but she will fall back asleep if you give her the opportunity. The more you do this the quicker this situation will change.
Good Luck and write me if you have questions,
Sleep Consultant and Parenting Coach