This may be because of overactive bladder (primary or secondary). Thorough history and Bladder diary is required . Urine infection to be ruled out , ultrasound with full bladder and post void residue will tell about the bladder capacity and strength.
Next Steps
Consult Urologist with said tests
Health Tips
Reduce fluid intake 3-4 hours before going to bed till you consult Urologist