Yes, Government securities can be exited before the maturity period. After allotment they are transferred to your Demat account and can be sold on the exchange just like stocks.

Note: The liquidity of government securities in the secondary market is subjective to each symbol, although it generally tends to be on the lower side. One might find it difficult to exit, especially in Government bonds and SDLs.