Lets have basic understanding of mudra. Every finger of hands relates to one of the five element of the nature. The thumb relates to fire, the index finger to air (matter in gaseous form), the middle finger to ether (space), the ring finger to earth (solid matter), and the little finger to water (liquids) and the palm of the hand relates to the mind.
When mudras are formed by using thumb (fire element) to lightly stimulate one or more of the other elements as you touch the tip, nail, knuckle or base of a finger. So, we can
- stabilize the influence of the linked element by joining the tip of corresponding finger,
- decrease the influence of the linked element by touching the back of the corresponding finger (nail or knuckle)
or
- increase the influence of the linked element by bring thumb to the base of the corresponding finger
Lets analyze the Gyan Mudra

Index finger that corresponds to air element is stabilized as per the above guidelines. So, basically, the air element is stabilized. Pitta consists of water and fire, whereas kapaha consists of water and earth. I therefore cannot correlate gyan mudra with pitta or kapha. Since the air is stabilized, it helps to stabilize the mind consequently, so it can be helpful for better sleep.
You may try kapha nashak or/and vata nashak mudra to counter your kapha or vata issues. I also recommend you to modify dietary lifestyle as well to counter such issues.