Your problem is poor drainage. Soil that stays wet for long periods of time get lots of anaerobic bacteria operating in them and those kinds of bacteria produce offensive odors, just what you are smelling. A simple mehtod to test a soils drainage capability is to dig a 1 foot square hole 1 foot deep and fill it with water. Once that water drains away refill the hole and time how long it takes for that water to drain away. If it takes longer than 6 hours for the 2nd pail of water to drain corrective action is required, adding lots of organic matter to the soil to open up the soils pores so water can flow through. One garden I did that test to once took 4 days for the first pail of water to drain away and the "gardener" did not understand why her plants kept dying on her.
Q