Hi Edwin. Welcome to NGA!
I guess your soil must not drain well - like it has too much clay or needs lots of compost or lots and LOTS of grit, coarse sand or bark chunks. (If the bed has sides and floors like plastic that do not allow water to drain, remove the plastic or punch holes in it! But you must already know that.)
If you have some slope to work with, you can dig some narrow trenches to give the water a path DOWN out of your beds and to a lower spot somewhere. Indeed, it might be good to arrange drainage for your whole yard: even grass doesn't like its roots drowning.)
If the water-blocking layer in your soil is thin, you might be able to dig a hole down through the clay to a layer that drains better. Like a well in reverse, it would allow rain water to flow down and into the deeper subsoil.
If there's no slope to work with, and the impermeable soil goes deep, you might have to make your raised beds more raised: taller walls. If rain IS going to flood your yard for days at a time, all you can do is grow plants in something tall enough that it has sufficient root zone ABOVE the flood level. At least get the bed tall enough that normal rains don't flood it.