Chipping in for @tekka
On the gateway side, I can see that the node successfully registers and gets its ID. But for an unknown reason, after a few seconds, it keeps sending data as if time_elapsed never changed to false. And it never goes to sleep.
Please be aware that sleeping on interrupts is rather tricky to get right!
When going to sleep, pending interrupts will immediately wake the AVR again. See the MySensors code from https://github.com/mysensors/MySensors/blob/development/hal/architecture/AVR/MyHwAVR.cpp#L183 on.
In your case pending interrupts are very likely, as you use a mechanical button that hasn't been debounced.
Furthermore you are using MySensors internal functions that might work for now, but are not guaranteed to work in the future.
I would suggest to stick to the official API whenever possible.
MySensors development branch offers the ability to sleep for a fixed time and report remaining sleep time. Your node should just go back to sleep until 5 minutes have passed; see my post here: https://forum.mysensors.org/topic/9595/interrupted-sleep/11
Only drawback on AVR is the usage of the watchdog as a sleep timer, which makes it impossible to exactly get 5 minutes sleep interval.