Intensely thinking about something obsessively and/or endlessly.
I laid awake in bed for 5 hours last night brain crunching about an idea for my Youtube channel.