Good day,
sorry you're experience that.
If you are comfortable in doing so, can you offer more information please so I can advise?
What is the name of the app?
when the app is running without issue, is it in this menu pictured below?
https://i.postimg.cc/KcQZtx8F/pic.png
drag down from the top twice and there might be a number where the green circle is. tap on the number
When the app stops running, does it reflect in the same menu? (you wake up and it says the app is running for 1 hour when it should be running for 20 hours)
What did you observe to conclude that the app isn't running? no notification when there should be one?
Is this app connected to or monitoring a device near to you? (e.g. bluetooth)
Is the device it is monitoring in the same room as you or several rooms away?
Or
is this app primarily communicating over the internet? (e.g. You see the status of someone else in another building)
Do you sleep with do-not-disturb mode or sleep mode?
Is automatic reboot set to a short duration? (e.g. 2 hours)
Is this medical app in another profile, private space, or owner? If the medical app is in another profile, do you switch to owner while you sleep? Do you have google play services installed in the same profile that the medical app is in?
Some things to try:
Under the app's info page:
- notifications off then on
- Deny all permissions to the app then enable them again.
- Mobile data usage: set unrestricted to off then on. background data to off then on.
- App battery usage: Do Not allow, then allow. set unrestricted
- Turn off "manage app if unused"
- if it shows: "display over other apps", "alarms & reminders"
- Set all of these to now allowed then allow.
- Turn off then on exploit protection compatibility mode
andreasputlitz problems with Samung
Samsung is known for aggressively killing apps to extend the battery life.