It doesn't, so you'll have to update your system settings.
On Android, the setting should be located somewhere like this, but might vary slightly depending on which phone you're using:
Settings -> My Device -> Display -> Screen Timeout
If your phone is like mine, you might find that the highest the inactivity timeout can be raised is to 10 minutes. If that's a problem, you can install an app to keep your phone from timing out instead.
Your eggs not hatching is independent of your mode of transit. This means that whether you are on a boat or not does not affect your eggs hatching. What does affect distance being recorded is connection to the internet, travel speed, and being soft banned.
Connection to the internet - when you visit a lake, often you are going to remote places with no wifi and poor cell coverage. Thus, if the app cannot accurately track your location and connect to Niantic servers, you distance will not be tracked for your eggs. Check your available networks and reassure that you still have ample data coverage on your boat.
Travel speed - it is now confirmed by a large number of players that traveling too fast can affect egg hatching. It is a general consensus among players that the maximum speed for hatching eggs is ~10-12mph (15km/h is about 9.3mph), so perhaps consider slowing down, as you are traveling at just about the maximum speed for tracking egg hatching distance. You can reference this question for more about speed: How fast can I travel?
Soft ban - if you have been recorded for cheating via GPS spoofing or any other form of cheating, you will likely be soft-banned (or banned for a short amount of time). When you are soft banned, you cannot catch Pokemon (they all run away), some distances don't track, and you can't get items from PokeStops. Refer to this question for more about soft bans: Why can't I catch Pokemon in Pokemon Go anymore?
In addition, if it worked yesterday and doesn't work today, it might just be a server issue with Niantic, and will resolve itself in time. It's a bit hard to conclude anything with only 24 hours of evidence, but wait a little longer and try again. If your distance is still not tracking, consider one of the above prognoses.
Best Answer
After it caches you going faster than permitted, It checks few times to make sure you've actually slowed down before it starts tracking again. So while driving, after the first several second - it stops tracking and will not restart, until you stop and walk. I've tested this myself, there is this long quite street near my house that I'd go as slow as possible with my car, never had a single cm tracked on there.