It's a somewhat idiomatic usage. Literally, [You can] trust me to [do something stupid, is effectively a rueful admission that it's typical of me to do stupid things (so it's no surprise that I just did it again).
It's not only used when the speaker is calling attention to his own (typical) action, so...
"Trust you to do something stupid!"
...is an idiomatic colloquial usage meaning You've just done something stupid, which is typical of you.
Also note that the "typical" action needn't always be an obviously bad thing. I can't easily track down a written instance, but...
"Trust John to throw a great party!"
...could reasonably be said admiringly by a guest if John's party is obviously going really well, and everyone (or at least, the speaker) knows perfectly well that John's parties are always great fun).
I should perhaps point out that in every context I can imagine, the object of the verb (you, John) is always heavily stressed in speech.