At midnight I will rise to give thanks unto thee,.... Not only send up an ejaculatory thanksgiving upon his bed, but rise up from it and shake off his sleep, and in a set, serious, solemn manner, praise the Lord.
This shows a great regard to him, and affection to this work, since it is with difficulty men prevail upon themselves to rise at midnight upon any occasion; at midnight Paul and Silas prayed and sung praises to God, Ac 16:25;because of thy righteous judgments; upon the wicked, as Aben Ezra; the hands and troops of them that encompassed him about, and robbed him; but God avenged him of them, and for this he gave thanks, or for such like things.
Sometimes the judgments of God have been executed at midnight; as the destruction of the firstborn in Egypt, and of Pharaoh and his host in the Red sea, when Israel sang his praise, Ex 12:29; and for the judgments of God upon antichrist the church will rejoice and give thanks, Re 18:20.