Routing on water is basicly the same as on land: You have to abstract your geometries into a Graph, that is an abstract representations of points and connections between them, each connection associated with a certain cost (for example, travel time or distance).
The difference seams to be the way of how you create your graph over waterways. For rivers it might be the same as for land roads. But if you have the open sea or a lake there are endless possibilities to go. Consider straight lines between start and end costal points, in combination with intermediate points that get you round corners around the coast, an island or sand bank.
To create these graphs algorithmically could be tricky, but possible. Another idea is to just collect tracks of vessels with GPS and feed these into your database. Or try to collect AIS data: Marinetraffic (if they reached their destination, their route can't be too bad). You could even select the fasted/shortest tracks out of these tracks, if you collected enough data.
For the practical part: Have you heard of OpenSeaMap? They have a bunch of maps and raw data for vessels on the basis of OpenStreetMap (for example waterways into harbours) You could download this data as a basis. They even have a trip planner (Törn-Planer), though this is not automated but you have to create your route by clicking waypoints on the map. Here is a screenshot: