I remember the original thinking behind having humour so prominent in SG-1 was because much of sci-fi was so humourless and took itself too seriously. And then Stargate eventually goes down this path anyway with SGU.
Ironically, though it's often called the darkest Trek series, DS9 probably had some of the funniest jokes in the entire Trek franchise.