In my corner of the world, the two exressions given in the accepted answer to this question have become conflated. Now, to "have a bee up one's butt" is to have a sudden and obsessive need to do something one does not normally do.
Example uses:
Alice: So what made you want to plant a garden in your front yard?
Bob: I don't know. I guess I just got a bee up my butt.
Or
Dave: Where has Eve been all week?
Char: Ah, you know how it is. She and her husband got bees up their butts and flew off for a tropical vacation.
While the "butt" variant is not blatantly obscene, it is perhaps not suitable for all social situations. I suppose the original version with "bonnet" is better, but seems a bit antiquated- when did you last see anyone wearing a bonnet?
Is there an expression or idiom that would:
- Be acceptable in polite company
- Convey a similar whimsy
- Fit in with modern fashion and norms