I believe you can go AFK in jail only if you have been admin jailed, which is OOC jail. If the SD jailed you, and there are officers to RP with you are not allowed to go AFK in the jail. I believe it wouldn't be a problem, if there are 0 officers online and you go AFK. And one questions, are you sure an admin kicked you or you have been automatically kicked by the server, because you were AFK/alt-tab more than 15 or 30 minutes?
Yes, if you have been jailed IC'ly you have to stay IG and do not go AFK. If there are no officers online, you can use /assistance and request a permission from an admin to go AFK, otherwise you cannot and you'll be probably kicked again. Do you have any questions?
What if an police officer come and wants to wake him up? As I said he have to use an /assistance and request a permission from an admin in order to go AFK in IC jail+there shouldn't be police officers online, otherwise I'd recommend him to stay IG and RP his actions in the jail. Locked and Archived as the question was answered.