When it comes to what to use to clean a glass or wood pipe, there are loads of options and, as it turns out, people get really territorial and weird about their personal method and want to insist to you that it's The Best Way, which is pretty un-chill, but also sort of endearing. Rubbing alcohol, vodka, Formula 420 -- those are all ones that people will evangelize about. For our purposes, we're going to use rubbing alcohol to talk about methodology, and you can swap in vodka or white vinegar or water+epsom salt or or or or or. Lots of options, is the takeaway here!
Fill the bag or container with equal parts rubbing alcohol and warm water. Then add a liberal amount of kosher salt, put the lid on or seal the zipper, and give it a good shake. Then, let it sit for 30-60 minutes before rinsing; if there's still lingering residue, use a pipe cleaner to coax the gunk out.
If you're using a bowl rather than a sealable bag or container, you won't be able to get that cool agitation effect, which means that you'll want the cleaning agent to provide that for you. Enter baking soda and vinegar! Or denture tablets and water. Things that fizz, is the idea here. Denture tabs can be dropped into the bowl and then covered with warm water; if you use baking soda, cover the piece with a good amount of the stuff then pour white vinegar over and marvel at the cool-ass volcano effect. Allow the piece to soak for 10-15 minutes then rinse with warm water.