Ever heard of the Prophetic Medicine? There are many advices from the Prophet (salallahu alayhi wassalam) to cure some ailments. These are recorded in Authentic Hadeeths.
The Prophet (salallahu alayhi wassalam) also said :
Sunan Abu Dawud Book 22, Number 3846:
Narrated Usamah ibn Sharik:
I came to the Prophet (salallahu alayhi wassalam) and his Companions were sitting as if they had birds on their heads. I saluted and sat down.
The desert Arabs then came from here and there. They asked: Apostle of
Allah, should we make use of medical treatment? He replied: Make use
of medical treatment, for Allah has not made a disease without
appointing a remedy for it, with the exception of one disease, namely
old age.
Sunan Abu Dawud, Book 22, Number 3855:
Narrated Jabir ibn Abdullah:
The Prophet (salallahu alayhi wassalam) sent a physician to Ubayy (ibn
Ka'b), and he cut his vein.
Muslim scholars have agreed that adopting the proper and Islamically permissible means to reach a specific end and does not contradict Tawakkul (putting one’s trust in Allah).
Since, the question is about the Prophet (salallahu alayhi wassalam) himself, it is also known that he used to get cupped (Hijamah) when he had any ailment which is a prophetic solution as well.
Sahih Bukhari, Volume 7, Book 71, Number 595:
Narrated Ibn 'Abbas:
The Prophet was cupped and he paid the wages to the one who had
cupped him and then took Su'ut (Medicine sniffed by nose).
Sahih Bukhari, Volume 7, Book 71, Number 602:
Narrated Ibn 'Abbas:
The Prophet was cupped on his head for an ailment he was suffering
from while he was in a state of Ihram. at a water place called Lahl
Jamal. Ibn 'Abbas further said: Allah s Apostle was cupped on his head
for unilateral headache while he was in a state of Ihram .