When you poured the vinegar into the water, a chemical reaction between the vinegar and baking soda produced carbon dioxide gas. A lot of the gas escaped into the air, but some of it was dissolved into the water. The tiny bubbles remaining in the glass were full of carbon dioxide.
When the seeds fell into the water, they sank to the bottom, became covered in small bubbles, rose to the top, and sank again. They should have kept rising and sinking for several minutes.
The gas made the seeds swim. In water, bubbles of carbon dioxide form quickly on the tiny points of a rough surface, such as the surface of a seed. After a while, a seed becomes covered with enough bubbles to make it rise to the top of the water.
At the water’s surface, a few of the bubbles break. Without those bubbles to hold it up, the seed sinks and lies on the bottom until it has regained enough bubbles to rise to the top again.
So this activity may look like magic, but it’s really science. Sorry to burst your bubble.
By: A.B. Brooks