Hey man. One way would be to local store the last time your game has been played, maybe doing some verifications from time to time when it is being played.
When your player opens your game again, compare the actual time with the last time it has been played (stored in local storage) and update your health bar accordingly.
This is not a very good approach. It may lead the players to cheat in your game. A good way would be to do it using an external web server to better protect the data. Basically doing the same thing, but verifying and storing time values from and on the server.
Also, I just found a topic here in the forum called "HOW DO I COMPARE TIME BETWEEN GAME SESSIONS ?". The guy have a google drive link with an example about it.
https://www.construct.net/en/forum/construct-3/how-do-i-8/how-do-i-compare-time-between-141171?kws=elapsed%2btime