This prayer is not Wajib, but it is highly recommended. It can be be prayed after midnight till true dawn (fajr). 
There are a number of ayats of the Holy Qur’an referring to the Night Prayers. 
Truly the rising by the night is most potent for governing (this soul) and most suitable for (forming) the word (of prayer and praise) [73:6]

Their limbs do forsake their beds of sleep while they call on their Lord in fear and hope. And they spend (in charity) cut of the sustenance which we have bestowed on them. [32:16]
And pray in the small hours of the morning an additional prayer (of spiritual profit) for thee. Soon will thy Lord raise thee to a station of praise and glory. [17″79]

The Prayer consists of 3 parts and a total of 11 Rakats to be prayed as follows:
    a) Niyat: (Namaz-e-Shab) – 8 Rakats (4 Prayers of 2 Rakats each, to be prayed like the morning Prayer)
    b) Niyat: (Namaz-e-Shafa) – 2 Rakats (to be prayed like the morning Prayer)
    c) Niyat: (Namaz-e-Witr) – 1 Rakat as follows 
        1. Recite Surah Al-Fatiha (once)
        2. Recite Surah Al-Tawhid (thrice)
        3. Recite Surah Al-Falaq (once)
        4. Recite Surah An-Nas (once)
        5. Qunoot – as in any 2nd Rakat. 
            While hands in the Qunoot Position, recite:
                i: 70 Times – Astaghfir-Ullaha Rabbi wa Atoobo Ilaih
                ii: Recite 40 Names of Male or Females beliviers, each to be preceded by Allah-hom mughfirlil.
                If it’s difficult to recite 40 names, then recite ”Allah-hoom mughfirlil momeneen wul momeenat”
                iii: Then recite 300 times “Al-Afv” (Please Forgive)
                iv: Then complete the prayer by Rukoo, Sajadah and Salam.

It is MOST Important to Give Sadaqa on behalf of the deceased ON the FIRST Night of Burial .This has MANY benefits & can only be achieved by giving Sadqa on the first night when it is MOST needed by the deceased. Have pity on your dead ones and give Sadaqah on their behalf so that their difficulty is reduced and if there is nothing to give in Sadaqah you must pray two rakats prayer.

Namaz Wahshat can be recited as under

It is befitting that on the first night after the burial of a dead person, two Raka’ats of wahshat prayers be offered for it.

The method of offering this prayers is as follows:

In the first Raka’at, after reciting Surah al-Hamd, Ayatul Kursi should be recited once

In the second Raka’at, Surah al-Qadr should be recited 10 times after Surah-al-Hamd;

After saying the Salam the following supplication should be recited: Alla humma salli ‘ala Muhammadin wa Ali Muhammad wab’ath thawabaha ila qabri ……(here the name of the dead person and his father’s name should be mentioned).

Wahshat prayers can be offered in the night following the burial of the dead body at any time, but it is better to offer it in the early hours of the night after ‘Isha prayers.