I have actually seen this pattern a lot recently. Recently I have
started using a function:
mergeMaybes :: (a -> a -> a) -> Maybe a -> Maybe a -> Maybe a
mergeMaybes f Nothing y = y
mergeMaybes f x Nothing = x
mergeMaybes f (Just x) (Just y) = Just (f x y)