I tend to turtle often from stimulants/caffeine. What's helped me is staying warm in general, wearing long underwear/long sleeves, using a space heater, and especially using a rice sock to heat my dick throughout the day. In my experience, turtling is not completely random and frequently signals that my body is diverting blood elsewhere for other purposes. This includes digestion after meals, and to muscles while working out.