What happens in between inspiration and the finished beat varies between artists and producers.
When I get inspired and I hear a beat in my head, I usually.
1. Keep the beat going by beat boxing it.
2. Record myself beat boxing ASAP.
3. Lay drum & instrumental tracks over my my beat boxing.