The Senate is considering controversial changes to voting laws that will disadvantage so-called "micro parties".
The ruling Coalition, the Greens and independent senator Nick Xenophon support the changes.
But the opposition Labor party and micro party senators oppose them.
The debate, which is continuing this morning, is at this stage the ninth-longest in the history of the Senate.
Australia's complex system of voter preference distribution presently allows micro parties to secure Senate seats, even if they receive a very small percentage of the primary vote.
At the last election a clutch of micro party and independent senators, including Ricky Muir of the Motoring Enthusiasts Party and former rugby league footballer Glenn Lazarus, won seats in the senate.
These senators have frustrated the government by blocking legislation. Their presence in the Senate also affects the Greens, depriving them of the balance-of-power position they have often held in the upper house.
During the all-night debate, Labor senators consistently spoke off-topic to delay votes to nine amendments to legislation that would give voters greater control over where their preferences were allocated.
The marathon session produced some unusual behaviour among the senators.
Independent senator Nick Xenophon, who supports the reforms, showed up to one vote wearing pyjamas covered with pictures of monkeys and bananas. He was asked to change.
Labor senator Doug Cameron began quoting Monty Python during one exchange: "You empty-headed animal food trough wiper â€¦ I fart in your general direction."
And Glenn Sterle, also from Labor, compared the marathon debate to a colonoscopy.
Labor has vowed to fight the voting amendments, saying they will allow the government to more easily gain the balance of power in the Senate.
But the government says the move will give voters more power and prevent backroom deals.
"The only people who get advantaged by this reform are voters," Finance Minister Mathias Cormann said.
Monty Python references, a colonoscopy analogy and a pyjama-clad senator featured during an all-night sitting of Australia's upper house.