This question pertains to organism dispersal, which is a very active field of study with relation to it's impact on conservation efforts. Much of what I will say below has been covered in this wiki.
Definition: From the Wiki
Technically, dispersal is defined as any movement that has the
potential to lead to gene flow.
It can be broadly classified into two categories:
- Density dependent dispersal
- Density independent dispersal
The question of frogs and fishes both refer to Density independent dispersal, while an example of density independent dispersal can be the competition for habitat space between big cats and humans (this is a WWF pdf)
From the wiki:
Organisms have evolved adaptations for dispersal that take advantage
of various forms of kinetic energy occurring naturally in the
environment. This is referred to as density independent or passive
dispersal and operates on many groups of organisms (some
invertebrates, fish, insects and sessile organisms such as plants)
that depend on animal vectors, wind, gravity or current for dispersal.
Density dependent or active dispersal for many animals largely depends
on factors such as local population size, resource competition,
habitat quality, and habitat size.
Currently, some studies suggest the same.
This study in particular studied the movement and habitat occupancy patterns within ephemeral and permanent water bodies in response to flooding. They found that during flooding these frogs moved out to flooded ephemeral water bodies and later on moved back again to the permanent ones.
Other suggested readings for those highly interested in the subject may include this (a phd thesis) and this (a project report)