Prolonged nutrient limitation has been extensively studied due to its positive effects on life span. However, less is understood of how brief periods of starvation can have lasting consequences. In this study, we used genetics, biochemistry, pharmacology and behavioral analysis to show that after a limited period of starvation, the synthesis of egl-2-encoded ether-a-go-go (EAG) K+ channels and its C-terminal modifications by unc-43-encoded CaMKII have a perduring effect on C. elegans male sexual behavior. EGL-2 and UNC-43 interactions, induced after food deprivation, maintain reduced excitability in muscles involved in sex. In young adult males, spastic contractions occur in cholinergic-activated sex muscles that lack functional unc-103-encoded ERG-like K+ channels. Promoting EGL-2 and UNC-43 interactions in unc-103 mutant adult males by starving them for a few hours reduce spastic muscle contractions over multiple days. Although transient starvation during early adulthood has a hormetic effect of suppressing mutation-induced muscle contractions, the treatment reduces the ability of young wild-type (WT) males to compete with well-fed cohorts in siring progeny.