If you are younger than I am maybe you have never had this told to you but when I was young basically everyone I knew had this rule forced upon them by their parents. There are mixed stories on how this ever became a "thing" but it was all based on old wives' tales or just gossip. There is no truth to not waiting an hour being dangerous for you and it's time for this one to go away.
src
screw you Karen, I do what I want
I don't know what your parents told you but I was told that if I didn't wait an hour that the food in my belly could potentially cause cramping in my body while swimming and this would result in me somehow losing control of my arms and legs and then I would drown. Maybe it wasn't exactly that, but it was something along those lines.
I've gotten cramps while swimming in the past and it definitely wasn't a pleasant experience, but it also wasn't so debilitating that I was just going to give up on life and drown. You CAN keep moving with a stitch/ cramp it just isn't a nice feeling... I would imagine drowning is probably worse though.
Someone who found it funny that parents were still telling kids this information actually dug into the data and while the information was only gathered from the United States it was still pretty telling. Less than 1% of all drownings occurred directly after a person had eaten and even in these cases it can not be attributed to the fact that the person drowned because of not waiting long enough after eating, it is likely just a coincidence or the fact that the person in question was just a weak swimmer to begin with.
src
Further research has been done on this topic and while I do not know how they determine this or trick the body into believing it is in trouble but scientists have discovered that your body will actually switch off digestion when something else, like swimming, is taking place. I don't pretend to understand everything about the human body, but it is a pretty amazing piece of equipment.
On the other side of things this same study came to the somewhat obvious conclusion that being drunk and swimming is a really bad idea. A whopping 70% of all drownings can be connected to alcohol consumption and even though I do engage in drinking and sport on a somewhat regular basis, even I know that being inebriated and having a bowl of liquid courage in your gut at the time while being in something that can definitely kill you, is not a good idea.
I came to this realization at a lake one day when a similarly drunk friend of mine and myself had the amazing idea to have a swimming race out to a buoy and back. We hit the water like we were competing in the 100M in the Olympics only to quickly slow down. Realizing that couldn't touch the bottom and the buoy was a LOT further away than it appeared from the beach, we wisely decided to turn around and call off the competition.
So the next time someone tells you that you have to wait an hour before swimming you can correct them. No you just have to not be a numpty and if you are drunk, maybe at least have the sense to have a floaty with you.
src
Drunk tubing on a slow moving river is one of the best things you can do on a weekend in my opinion and it is highly recommended. I just wouldn't plan on it being much of a workout.