According to https://matomo.org/changelog we should upgrade to 3.9.1 to allow to fix some security issues.
Changelog 3.7.0 -> 3.9.1 (4 releases):
- https://matomo.org/changelog/matomo-3-8-0/
- https://matomo.org/changelog/matomo-3-8-1/
- https://matomo.org/changelog/matomo-3-9-0/
- https://matomo.org/changelog/matomo-3-9-1/
As far as I can see from the notes there is not big schema change to perform so this upgrade should be very quick and not too painful.