The Imām was asked:

Regarding what occurs amongst the awwām who when in distress say "ya shaykh fulān" and "ya Rasūlullāh" and things like this from seeking aid (istighātha) with the Prophets and the Awliyā, the `Ulemā and the righteous, is this permitted or not? And do the Messengers, Prophets, Awliyā, the righteous, and the Mashayekh possess the ability to assist others after their deaths, and what strengthens that view?

Fatwa on Istighātha
Imām Shihāb al-Dīn al-Ramlī