Is this normal ??

Currently 30 weeks if I’ve been sleeping for a long period of time I wake up with mild pains and needing to wee but when I go toilet the pains go is it just from holding a wee in for a long time? I’ve had it for a while now