First of all the next time this problem happens, lift the top of the toilet tank off and check to see if the flush valve flapper is caught. It probably isn't sitting down as it should. Quite often it is the float ball or chain that it that is the culprit. If it is the chain try shortening it a little. If the problem turns out to be the float ball, well this can usually be adjusted by the screw setting at the linkage arm from the float rod to the ballcock.
If you bend the rod up you will find that the water level in the tank will be affected. So be careful not to create overflow onto the bowl. So better not to do it.
Some older style toilets use lift wires and guides as a part of the linkage between the flush handle (trip lever) and the flush valve. It can be difficult to clean and align these wires and guides and they can be hard to find at the hardware store. Luckily, it's easy to repair by removing the old and replace with universal type trip lever, chain, and flapper setups. Don't buy a flapper that has a plastic or rubber line attached. The type with the chain made up of small metal balls is better by far.