Please help

I’m 19 and last night I wet the bed out of nowhere. I always wake up to go to the bathroom but last night I woke up suddenly when I felt my shorts getting wet. I have no idea how or why this happened and am afraid of it happening again. Has anyone experienced this or have any ways to help???