Regarding Nigeria, it's difficult to give a clear answer to this. While there are currently no laws in place that make accessing Twitter truly illegal, police have been searching phones and the government has claimed that those found using the app will be arrested.
Other countries seem to be less heavy-handed in their enforcement of bans they have in place.
All we can say is that you should weigh up the pros and cons before you choose to evade the Twitter ban, and take measures to ensure you're not caught.