I had tummy/back liposuction, and I am wearing a medical compression garment. How long do I have to wear this?

Surgeon recommends. I presume you had a surgeon operate on you whom you have placed your trust in to perform the surgery. Please follow their instructions unless you have lost trust. Generally this is recommended for 3-6 weeks but outstanding plastic surgeons will vary in their advice. There are no absolute recommendations.
Varies. The use of garments will vary from one practice to another. Therefore, best to follow your own plastic surgeon's advise. Remember that he/she knows exactly what was done and is ultimately responsible for your care. Best wishes.
Doctor preference. Different doctors have their patients wear garments for differing periods of time. Longer wear might help mold the results in some cases. It is a matter of opinion however. :).
Compression garments. Compression is a very important part of your tummy tuck/ lipo recovery. I advise my patients to wear the compression garments around the clock for the first two weeks. After that, i recommend wearing the garment 12 hours a day for another two weeks. After you have put so much time and money into the actual procedure, this is the finishing touch for great results!