When I was a young girl, it was very difficult for me to read of these accounts that are so horrific which portray the callous and unfeeling nature of those people. But, I later realized that I was letting my emotions, and my perspective from a Christian background and culture color a straight forward and unbiased account of events that happened a long time ago in a very different culture and to very wicked people.
One of the proofs that the Bible is the inspired word of YHVH is this very unbiased and detailed account of events, for if men had written of these events they would certainly have been shaded with justifications and rationalizations for their actions. But, our Father has not left us without the reason.
That the Holy Spirit recorded the actions of men does not denote approval of those actions. Every record is important as everything from Genesis to Revelation concerns in one way or another the account of the First and the Last, the Aleph and the Tav (Gen. 1:1), the Alpha and the Omega... the Messiah, Yeshua (Jesus) (Isa 41:4; 44:6; Rev. 1:8).
Keeping this in mind, then we search the scriptures to see why YHVH needed to tell us the wicked and evil things that people of the Lord had done.
"1 And an angel of the Lord came up from Gilgal to Bochim, and said, I made you to go up out of Egypt, and have brought you unto the land which I sware unto your fathers; and I said, I will never break my covenant with you.
2 And ye shall make no league with the inhabitants of this land; ye shall throw down their altars: but ye have not obeyed my voice: why have ye done this?
3 Wherefore I also said, I will not drive them out from before you; but they shall be as thorns in your sides, and their gods shall be a snare unto you." (Judg. 2:1-3, KJV)
After Joshua had died, and the elders of his generation, the following generation did not know or remember the wonderful things God had done for them, and began to do what was right in their own eyes (Judg. 17:6; 21:25).
"10 And also all that generation were gathered unto their fathers: and there arose another generation after them, which knew not the Lord, nor yet the works which he had done for Israel.
11 And the children of Israel did evil in the sight of the Lord, and served Baalim:
12 And they forsook the Lord God of their fathers, which brought them out of the land of Egypt, and followed other gods, of the gods of the people that were round about them, and bowed themselves unto them, and provoked the Lord to anger.
13 And they forsook the Lord, and served Baal and Ashtaroth.
14 And the anger of the Lord was hot against Israel, and he delivered them into the hands of spoilers that spoiled them, and he sold them into the hands of their enemies round about, so that they could not any longer stand before their enemies.
15 Whithersoever they went out, the hand of the Lord was against them for evil, as the Lord had said, and as the Lord had sworn unto them: and they were greatly distressed." (Judg. 2:10-15, KJV)
Because the children of Israel had not completely driven out the wicked ones of Canaan, God determined to leave the wicked tribes in the land to prove Israel (Judg. 2:20-23; 3:1-4).
So, the account of the Levite and his concubine in Judges 19 & 20 is setting the stage, and is the reason why the tribes begin to fight with each other. The KJV uses the word "whore", whereas the CJB merely says she was unfaithful. To the Western mind that might mean she committed adultery, but if so it would have been a death sentence. She would not have been welcomed into her father's house, nor would her husband have wanted her back.
Commentary from Jaieson-Fausset-Brown at Judges 19:2:
"2. his concubine … went away from him unto her father's house—The cause of the separation assigned in our version rendered it unlawful for her husband to take her back (De 24:4); and according to the uniform style of sentiment and practice in the East, she would have been put to death, had she gone to her father's family. Other versions concur with Josephus, in representing the reason for the flight from her husband's house to be, that she was disgusted with him, through frequent brawls." Source: Biblehub
The scriptures do not say that the Levite slept, only that he arose. We are not provided with any of his feelings nor his emotions during these events. We are only given the raw data, the acts that were committed.
Commentary from Jamieson-Fausset-Brown on Judges 19:
"1. it came to pass in those days—The painfully interesting episode that follows, together with the intestine commotion the report of it produced throughout the country, belongs to the same early period of anarchy and prevailing disorder.
a certain Levite … took to him a concubine—The priests under the Mosaic law enjoyed the privilege of marrying as well as other classes of the people. It was no disreputable connection this Levite had formed; for a nuptial engagement with a concubine wife (though, as wanting in some outward ceremonies, it was reckoned a secondary or inferior relationship) possessed the true essence of marriage; it was not only lawful, but sanctioned by the example of many good men.A Levite’s concubine runs from him to her father’s house at Beth-lehem; he goeth to fetch her back; is kindly entertained by her father; he departs, and comes to Gibeah of Benjamin, and his concubine with him, Judges 19:1-14. An old man of Mount Ephraim entertains them, Judges 19:15-21. The men of the city encompass the house, to debauch the Levite, who through necessity delivers unto them his concubine, whom they abuse to death, Judges 19:22-28. He carrieth her body home; divideth it into twelve parts; sendeth them into all the coasts of Israel, Judges 19:29,30." (Source: Biblehub
He did not directly kill his concubine. He found her dead on the doorstep (Judg. 20:4-5).
Was it right for that Levite to offer his inferior wife (concubine) to save himself? Was his behavior the next morning cavalier and unfeeling?
We cannot read the OT in the English and get all of the flavor and nuance of the Hebrew without knowing the Hebrew traditions, and the Law.
We could possibly justify that he was afraid when the whole house was surrounded by such wicked men - those sons of Belial - who might have torn the house down and killed everyone inside to get to that one man.
He did at least have enough anger over the treatment of his concubine / wife that he sent pieces of her body as proof of what was done throughout all of Israel. But, the entire record was the reason for the subsequent actions in chapters 20 & 21 of the tribes fighting among themselves.
You ask if his actions were correct. The answer is no. But, that is the point. God told us of these events so that we could see how wicked Israel had become while living among the evil Canaanites who they had left in the land. They had violated God's command and had become like the evil ones they lived among.
Jamieson-Faussett-Brown's Commentary at Judges 19:24:
"22-24. certain sons of Belial beset the house—The narrative of the horrid outrage that was committed; of the proposal of the old man; the unfeeling, careless, and in many respects, inexplicable conduct of the Levite towards his wife, disclose a state of morality that would have appeared incredible, did it not rest on the testimony of the sacred historian. Both men ought to have protected the women in the house, even though at the expense of their lives, or thrown themselves on God's providence. It should be noted, however, that the guilt of such a foul outrage is not fastened on the general population of Gibeah." Source: Biblehub
Though your question includes a mention of chap. 20, you have only asked about the Levite in chap. 19. But, in chap. 20 when the tribes gather men to go against Benjamin and Gibeah, they sought counsel of God, and asked Him a question.
"18 And the children of Israel arose, and went up to the house of God, and asked counsel of God, and said, Which of us shall go up first to the battle against the children of Benjamin? And the Lord said, Judah shall go up first." (Judg. 20:18, KJV)
They didn't ask God if they should fight against Benjamin. They asked Him who should go up first to the battle. God's answer was to send Judah, but God did not support Judah, and Judah lost 22,000 men (Judg. 20:21). They asked God if they should fight their brother Benjamin again, and God told them yes (Judg. 20:23). But, He still allowed 18,000 men of Israel to be killed.
Only on the third day did He allow Phinehas to succeed (Judg. 20:28-48). Throughout all of this period after Joshua's death and before a king was appointed, God supported those who proved themselves to be with Him, and did not support those who walked away from Him to do evil.
God's record of the Levite in Judges ch. 19 was not an approval of that man's actions. It was not an indication of acceptable behavior on his part. It was simply an account of what happened. YHVH made an oath and a covenant with the Israelite, but they broke it.
It is entirely possible that God might have provided an alternative solution in Judges 19 if that Levite had stood with YHVH and asked Him for deliverance from the evil ones.
YHVH continued to use those people for the promise He had made to Abraham in order to bring about the salvation plan through the lineage to Yeshua. He kept that promise, and delivered the Messiah through Abraham's promised seed, in Isaac (Rom. 9:7).