Check if your system is setting the environment variable TMOUT. To check this you can just do:
env | grep TMOUT
or
echo $TMOUT
If it is set, you could change it or unset it. To change the value:
export TMOUT=3600
Where the number is the number of seconds until you get logged out. Otherwise unset it to turn off the feature:
unset TMOUT
Note, it may be that your system administrator has set this for security reasons. So if you are not the system administrator you may want to check this before changing anything yourself.