Talk to your manager about it. If they're a decent human being they should be able to make it work for you. If not, then you're probably better off somewhere else (also because a manager should respect their people's wellbeing, if they don't then you shouldn't work for them).