Only the base of the item has anything to do with Sonic. The toothbrush heads & handle are just blue. The bristle/heads are very un-sophisticated, unlike modern toothbrushes.
This is the Sonic the Hedgehog Battery Operated Toothbrush. It must not have been very common, even in the 1990s somewhere, when it was produced. The base is modeled after the Sonic hard rubber play ball (seen on USA sporting goods page) and may even use the same mold. With it MIB like this, you can see that it comes with Sonic base, battery handle, 2 brush heads and a blue cup. Why the cup isn't Sonic branded is unknown. The back of the box shows you how to put the toothbrush together, and into the base. This is an interesting old item.