Sitting for short periods of time if you need may be ok. Your back will guide you in this regard, but know that sitting increases intradiscal pressures which may increase pain. If you must sit, do so for short periods of time and take a break to stand up and walk around every 15 to 30 minutes.