Staying healthy when coding a insane project

Rent/Buy summer house near water. Code for 20-30min, swim for 20-30 min (while thinking about what to code next). Or do it after you finish each tiny bit of code.
If you live in place like Iceland or Canada just move somewhere warmer. Visit friends/parents only for xmass (so you remember why you moved south).