The hand in warm water trick does really work but it may not work for everyone.
My brother when I was 7 years old and he was 10 put my hand in warm water while I was asleep and it did make me wet my pants.
I did the same to my brother a few nights later and he also wet his pants.
If you put your own hand in warm water it does not usually work as your body would be expecting it.
You need the surprise of the hand being in the warm water without knowing about it beforehand for the warm water to trigger the release of urine.
The reason putting someone's hand in warm water makes them pee is because of a thing called immersion diuresis.
The urination is brought on by pressure and temperature changes from immersing the hand in warm water.
The warm water also signals the brain to empty your bladder as warm water is calming for the body and activates the parasympathetic nervous system.
This activation can result in the relaxation of the bladder and possibly the pelvic floor muscles, bringing on the urge to pee.