A passenger with cannabis in his bag refused to get off a Sydney bus, urinated from the vehicle and slapped the driver, police say.

He then tried to bite and kick them as they arrested him.

The 40-year-old is said to have fallen asleep on the bus on Friday evening about 6.20pm and was woken by the driver as they arrived at a terminal at southwestern Hurstville.

He has been remanded in custody to appear in Sutherland Local Court on August 23 charged with wilful and obscene exposure, common assault, resisting police and possessing a prohibited drug.