I did a really bad thing!

I co-sleep with my daughter, meaning I have her sleeping next to my bed in her pack n play. When she gets fussy at night I usually take her out, unswaddle her and breastfeed lying down because she finds it really comforting and will fall asleep faster that way. When this happens I set several alarms in case I fall asleep so I can, after she's fully asleep, swaddle her again and out her in the pack n play. Well, last night I didn't set an alarm and I woke up to her being fussy three hours later, which absolutely terrifies me that I apparently wasn't aware enough to set alarms or be awake enough while she was in bed with me. I thank God that nothing happened but I'm so scared this could happen again 😭 I don't want to hurt my baby so please help me come up with a solution! Or scare me about bed sharing!