I am going through the same thing with my 7 month old and I have found solution that works for us and maybe it will work for you and it is drug free! A little background. My daughter has not pooped in the night since she was a month old and has always slept well going right back to sleep if she did wake up. Starting in January her sleep started to fall apart which corresponded with teeth and also learning to sit up. We had some rough night buts muddled through, it was more going to sleep than waking up during the night and if she did wake up allowing her to sleep with us fixed it. After she cut her bottom teeth we got 2 weeks off and then it fell apart again. She started waking up with a poopy diaper, going to sleep may or may not have been an issue but she started waking up at 11pm and then every 30mins until about 1am and then staying awake for a couple of hours etc etc. She would look wide awake and be thrashing wildly arms and legs going. I thought the same thing as you maybe she was having poop issues or maybe she was sleeping more lightly and was aware her diaper was wet and was complaining about that. 3 nights ago instead of just trying to get her to go back to sleep while sleeping myself I decided to actually watch her. It was 11.30pm she was waving her arms and legs about groaning and I was patting her back and soothing her, she had the paci but it did no good. At one point she covered her eyes and was rubbing her eyes so I put my hand over her eyes and she held my hand against her eyes with both hands (too cute). At that point I realized that she wanted to be asleep but the arms and legs kept going. She desperately wanted to be asleep but it was like she was having an out of body experience. Then she started to full on cry becuase she was exhausted I think. Suddenly I was reminded of something I read before she was born about how newborns can be afraid of their own arms etc and that is one reason to swaddle them. I picked her up grabbed a blanket and swaddled her tightly I barely got her back into the crib before she was asleep. This never crossed my mind before becuase she hated being swaddled when she was younger.
2 nights ago when she woke up at 11.30pm I picked her up swaddled her nursed her put her down and she went back to sleep until 4.30am. Last night she was having a tough time getting to sleep at 7.30pm so I swaddled her she was out before I put her down stayed asleep until 4.30am and then i fed her and re-swaddled her and she was asleep again until 7am.
I feel glad to have found something that will help her sleep that isn't tylenol. Don't get me wrong I think they need tylenol when they have a fever from teething and are actually in pain but when I watched her that night for over an hour she was not in pain. Her brain was just going 19 to the dozen.
I hope this works for you. It has been a life saver for my husband and me this week!
Good luck!