Whatever minimum assay time shows some reliable/repeatable effect is what the typical researcher would use. Beyond that, it depends on the behavior of interest and constraints of the analytical pipeline (practical limits on video file sizes, time availability, etc.)
Something like the novel tank is five minutes because that is long enough to observe an increase in activity and a decrease in the diving response, but not so long that you can't reasonably run a whole group of fish in one day. Generally speaking, the fish that "freeze" at the beginning of the session need 1-2 minutes to acclimate before they freely swim. You can always go longer, but if you go shorter, you run the risk of missing the effect of your treatment if it changes the stable behavior, but not the acclimation process.
This has a good example of the changes over time I am talking about and how a treatment effect might be just at the beginning, just at the end, or throughout the 5 min session.
Levin, E. D., Bencan, Z., & Cerutti, D. T. (2007). Anxiolytic effects of nicotine in zebrafish. Physiology & behavior, 90(1), 54-58.