It's for my dad.He still sleeps in a bed with my mom, but I reside in the home and I'm also the caregiver that would be alerted. Trying not to disturb my mom, but not allow him to get any further than the bedroom before I can get to him. He has dementia and his balance is not good and his memory is just declining quickly.
NOTHING will prevent a fall. (OK, maybe if the person is confined to a bed or wheelchair...oops nope they fall from those as well.)
You can use a baby monitor.
that will alert you if he gets up. But it will not prevent a fall.
A tracker he can wear as a watch will allow you to locate him but it will not prevent him from wandering.
It may be time to get him in another room.
It might be time to get him a Hospital bed.
Lowering the bed so it is very close to the floor so it is difficult to get out of but also if there is a fall it will not be from a great height.
As for an alarm, my great concern is your lack of fully uninterrupted sleep and the heath risks that come from that. 30% of caregivers die before the peopel they are giving care to.
I am so sorry, I know it is heartbreaking.
https://www.agingcare.com/search?term=bed+alarms