Earlier quoted context omitted.
This is a good story, and I'm glad your boss reacted well. But, it sort of bothers me how it's not considered acceptable in this world to take a sabbatical. Why are companies so against the idea of people taking a few months off in a row, especially if otherwise they would just quit?
A sabbatical can be long (and is not "vacation time" or "sick leave") because by default it's unpaid. So it's in the developer's interest as well for the manager to figure out a way to reshape his/her job to make it sustainable (and thus keep the paychecks coming) rather than just saying "uh, sure, go deal with your problems, take as long as you need; when you run out of money we'll still have your job here for you."…
Ha! That's fine until they get to 8 months and stop sleeping through the night again (which apparently is a common thing). A few weeks of chronic sleep deprivation can absolutely destroy your ability to do anything vaguely brain-work-related.