Terrifying!

My baby sleeps in a bassinet right by our bed. She's 9 weeks old. I woke up because she was stirring a bit. I watched her to see if she was just stretching or was hungry and wanting to nurse. She seemed to just be stretching and settled back down. A few minutes later, she starts flailing her arms and legs rapidly but not making a sound. I quickly picked her up and started patting her back. A few seconds later, she starts to cough and cry. She was clearly choking on her own saliva. She's fine now but I keep playing that moment over in my head. I held her for about a half hour while she fell back to sleep. I'm scared to go back to sleep thinking, what if I hadn't been awake? Has anyone else experienced this? I just keep praying over her asking God to protect her and wake me up if she needs me.