Sure, dressing up like characters we love has been done since the beginning of mankind. But cosplay is something different, distinguished primarily by not having occurred before 1939.
> [Nebuchadnezzar] celebrated his prowess by inscribing on two rock faces in the Wadi Briza, a ravine in the cedar mountains of Lebanon []. This was the region where the legendary Gilgamesh and Enkidu had fought and killed the monster Humbaba. Nebuchadnezzar referred to it as a place where he had cut down gigantic cedar trees for his temple doors -- implying that he was like Gilgamesh. On the surface of the rock he also had scenes carved that showed himself grasping a tree, presumably intending to cut it down, and fighting a lion, as Gilgamesh had done
From the excellent https://www.amazon.com/Mystery-Hanging-Garden-Babylon-Elusiv... :
> [Nebuchadnezzar] celebrated his prowess by inscribing on two rock faces in the Wadi Briza, a ravine in the cedar mountains of Lebanon []. This was the region where the legendary Gilgamesh and Enkidu had fought and killed the monster Humbaba. Nebuchadnezzar referred to it as a place where he had cut down gigantic cedar trees for his temple doors -- implying that he was like Gilgamesh. On the surface of the rock he also had scenes carved that showed himself grasping a tree, presumably intending to cut it down, and fighting a lion, as Gilgamesh had done