i wonder how the sand could have anything to do with it?
When fine sand is compacted, anaerobic bacteria can develop around detritus trapped in the sand. These bacteria produce pockets of hydrogen sulfide gas which can be quite nasty if suddenly released in large quantities. If there is enough gas, it can accumulate just above the surface of the water and cut off oxygen supply, if this is the case you would most likely be able to detect a smell like rotten eggs.
Ways to reduce anaerobic gases building up:
- Don't have your sand more than 1 to 1.5 inches deep.
- Disturb your substrate weekly as part of regular maintenance.
- Be wary if moving heavy ornaments as this can release gas trapped underneath
- Living rooted plants will help to reduce the problem
- Malaysian Trumpet Snails can keep the sand disturbed for you.
I've no idea if this is connected to your tank problems (your sand doesn't look too deep in your sig picture) but could be useful to know anyway. I hope you find what is causing your problems soon. Good luck.