that suggests the noise comes from something disengaging. if the clutch mechanism is 'sticky' this may happen, which just requires a cleaning
however, more things happen when you stop pedalling - chain loses the tension from your weight, rear cog no longer 'pulling' the hub to spin the wheel, etc. these can all make a noise potentially.
if you take off your chain and turn the rear cog by hand, can you replicate the noise? did any of your mates put a tiny steel ball bearing in your frame just to fuck with you? how worn is the sprocket/chain/rear cog? there're many things possible, need some narrowing down to the hub.
what does the noise sound like? a ping? a twang? click? is there a crack on the hub body?