I’m a Brazilian Jiu jitsu practitioner, and I’m interested in how/if the use of ground fighting techniques were used during ancient and medieval warfare. I’d imagine as two sides closed and got stuck in, some exchanges between combatants would go to the ground. Almost every group people that I can think of have some sort of traditional wrestling/grappling form. Jiu jitsu from Japan, wrestling forms in Greece, etc etc.
Would techniques be used once a fight between two individuals went to the ground or would who ever ended up on top just grab the first hard thing they could find and start bashing?
Medieval Europe most definitely had standing and ground grappling systems. They were used in two ways.
Would techniques be used once a fight between two individuals went to the ground or would who ever ended up on top just grab the first hard thing they could find and start bashing?
Yes, techniques were both learned and used. Your life depended on having better technique than your opponent.
The German word for grappling was Ringen. Standard medieval fechtbuchs (fighting books), taught armed combat as well as some unarmed or grappling techniques; grappling was integrated with armed combat. Fiori de Liberi's "Fior di Battaglia" is a classic case in point, and Talhoffer's work is another oft studied fechtbuch which also taught Ringen as part of an integrated fighting system, both armored and unarmored. If you were grappling in armor you would aim to drop and mount your opponent as soon as possible, then use your dagger to stab through their eye slit, or lift their visor to stab them in the face, or at least wrench their helmet up to stab them in the throat.
However, in the later Renaissance we see the emergence of the Ringbuch, or "grappling book", which teaches unarmed grappling exclusively. These include Hans Wurm's "Das Landshuter Ringerbuch" (1490), Fabian von Auerswald's "Ringer Kunst" (1539), Johann Georg Pascha's "Vollständiges Ring-Buch" (1663), and Nicolaes Petter's "Der künstliche Ringer" (1679).
As an example of historical grappling while fighting without armor but with weapons (Bloßfechten), here's a very quick (25 second), video of a standard Ringen play used in a longsword duel. I have been thrown in this same way myself during a longsword duel, and it is pretty devastating.
In contrast, see this video for examples of grappling techniques in full armor.