Here’s how drunkenness fits into Paul’s theme. First, note that the overall theme starts in 5:1-2:
Therefore be imitators of God, as beloved children. And walk in love, as Christ loved us and gave himself up for us, a fragrant offering and sacrifice to God. (ESV)
In 5:15 carefully translates the Greek word ἀκριβῶς, which is also translated accurately in other verses. We get the word acrobat from this word and you can think of how carefully and accurately the acrobat walks a tightrope. Thus, we need to live wisely.
5:16 “making the best use of” translates the word ἐξαγοραζόμενοι. It is also translated redeemed. Note it looks like our word exaggerate, but it has the idea of urgency in needing to rescues something. Time translates the word καιρόν and means opportune time as opposed to clock time. “Because the days are evil” is the reason for the urgency and need to redeem the opportunities.
5:17 Foolish translates the word ἄφρονες, which is the alpha privative in front of the word for mind. Thus, the word means mindless. We are not to be mindless, but seek to understand God’s will.
5:18 Here is where drunkenness fits in. When is a person more mindless than when he is drunk? Drunkenness puts a person in less control of how one lives. Debauchery translates the word ἀσωτία which means:
ἀσωτία, ας f: behavior which shows lack of concern or thought for the consequences of an action—‘senseless deeds, reckless deeds, recklessness.’ μὴ μεθύσκεσθε οἴνῳ, ἐν ᾧ ἐστιν ἀσωτία ‘do not get drunk with wine, for that results in reckless deeds’ Eph 5:18. In some languages ἀσωτία in Eph 5:18 may be rendered as ‘what one does without being able to think about it’ or ‘what one does when the mind is absent.’
Louw, J. P., & Nida, E. A. (1996). Greek-English lexicon of the New Testament: based on semantic domains (electronic ed. of the 2nd edition., Vol. 1, p. 752). New York: United Bible Societies.
This context seems to indicate that a person filled with the Spirit is in control of how one lives and consciously following God’s will. Note 1 Corinthians 14:32 and Romans 8.
Anyway, drunkenness fits in Paul’s theme because it is a mindless state. Paul is contrasting drunkenness with being filled with the Spirit, but be sure to note that Paul is not saying that being filled with the Spirit is a mindless state like drunkenness where the Christian’s mind is disengaged.