By default, when does an Analytics session expire?
At noon every day
When a user opens another browser window
When a user is inactive on your website for more than 30 minutes
After 30 minutes, regardless of user activity on your website
Sessions and campaigns end after a specific amount of time passes. By default, sessions end after 30 minutes of inactivity and campaigns end after six months. You can change the settings so sessions and campaigns end after the specified amount of time has passed.
Read more here: https://support.google.com/analytics/answer/2795871