A grandmother who allegedly stabbed her son's partner and a 10-year-old boy in a roadside rampage may have been suffering side effects from using the weight loss drug Ozempic, a court has heard.

Julie Ann Williams wept when her bail application was refused in Wollongong Local Court after a magistrate was told about the possibility she had experienced an Ozempic-induced rage.

Until her arrest, Williams, 60, had been living with her builder son Andrew Williams and his girlfriend Kellie Parkes in a house south of Sydney at Horsley.

Ms Parkes had been driving two boys aged 10 and three to judo on the evening of June 11 when Williams, who was in another vehicle, allegedly forced her to pull over on West Dapto Road at Wongawilli.

Williams allegedly got out of her car and pulled out a knife, then leaned through the front passenger window of Ms Parkes's car and stabbed the 10-year-old boy in the neck.